Browse Source

Merge branch 'main' into feature/user-roles

Kristan Kenney 5 years ago
parent
commit
abb81f5413

+ 22 - 3
bin/v-change-sys-api

@@ -25,7 +25,7 @@ source $HESTIA/conf/hestia.conf
 #----------------------------------------------------------#
 
 check_args '1' "$#" "STATUS"
-is_type_valid "enable,disable" "$status"
+is_type_valid "enable,disable,remove" "$status"
 
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
@@ -36,7 +36,15 @@ check_hestia_demo_mode
 
 if [ "$status" = "enable" ]; then
     if [ ! -f "$HESTIA/web/api/index.php" ]; then
-        wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/api/index.php -O $HESTIA/web/api/index.php
+        wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/$RELEASE_BRANCH/web/api/index.php -O $HESTIA/web/api/index.php
+        check_api_download=$(cat $HESTIA/web/api/index.php)
+        if [ -z "$HESTIA/web/api/index.php" ]; then
+            # Throw error message to user
+            echo "ERROR: API installation failed."
+            # Remove empty file created by wget output
+            rm -f "$HESTIA/web/api/index.php"
+            exit 1
+        fi
     else
         sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
         sed -i 's|////|//|g' $HESTIA/web/api/index.php
@@ -45,7 +53,18 @@ if [ "$status" = "enable" ]; then
 else
     $HESTIA/bin/v-change-sys-config-value "API" "no"
     $HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
-    sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
+    if [ "$status" != "remove" ]; then
+        sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
+    fi
+fi
+
+if [ "$status" = "remove" ]; then
+    if [ ! -f "$HESTIA/web/api/index.php" ]; then
+        echo "ERROR: API is not installed."
+        exit 1
+    else
+        rm -f "$HESTIA/web/api/index.php"
+    fi
 fi
 
 #----------------------------------------------------------#

+ 1 - 1
bin/v-rebuild-users

@@ -5,7 +5,7 @@
 #
 # example: v-rebuild-users
 #
-# The function all users on the system.
+# The function rebuilds user configuration for all users.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #

+ 138 - 0
func/syshealth.sh

@@ -0,0 +1,138 @@
+#!/bin/bash
+
+# Hestia Control Panel - System Health Check Function Library
+
+# Repair System Configuration
+# Adds missing variables to $HESTIA/conf/hestia.conf with safe default values
+function syshealth_repair_system_config () {
+    # Release branch
+    if [ -z "$RELEASE_BRANCH" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: RELEASE_BRANCH ('release')"
+        $BIN/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
+    fi
+
+    # Webmail alias
+    if [ ! -z "$IMAP_SYSTEM" ]; then
+        if [ -z "$WEBMAIL_ALIAS" ]; then
+            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_ALIAS ('webmail')"
+            $BIN/v-change-sys-config-value 'WEBMAIL_ALIAS' 'webmail'
+        fi
+    fi
+
+    # phpMyAdmin/phpPgAdmin alias
+    if [ ! -z "$DB_SYSTEM" ]; then
+        if [ "$DB_SYSTEM" = "mysql" ]; then
+            if [ -z "$DB_PMA_ALIAS" ]; then 
+                echo "[ ! ] Adding missing variable to hestia.conf: DB_PMA_ALIAS ('phpMyAdmin')"
+                $BIN/v-change-sys-config-value 'DB_PMA_ALIAS' 'phpMyAdmin'
+            fi
+        fi
+        if [ "$DB_SYSTEM" = "pgsql" ]; then
+            if [ -z "$DB_PGA_ALIAS" ]; then 
+                echo "[ ! ] Adding missing variable to hestia.conf: DB_PGA_ALIAS ('phpPgAdmin')"
+                $BIN/v-change-sys-config-value 'DB_PGA_ALIAS' 'phpPgAdmin'
+            fi
+        fi
+    fi
+
+    # Backup compression level
+    if [ -z "$BACKUP_GZIP" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: BACKUP_GZIP ('9')"
+        $BIN/v-change-sys-config-value 'BACKUP_GZIP' '9'
+    fi
+
+    # Theme
+    if [ -z "$THEME" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: THEME ('default')"
+        $BIN/v-change-sys-config-value 'THEME' 'default'
+    fi
+
+    # Default language
+    if [ -z "$LANGUAGE" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: LANGUAGE ('en')"
+        $BIN/v-change-sys-language 'en'
+    fi
+
+    # Disk Quota
+    if [ -z "$DISK_QUOTA" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: DISK_QUOTA ('no')"
+        $BIN/v-change-sys-config-value 'DISK_QUOTA' 'no'
+    fi
+
+    # CRON daemon
+    if [ -z "$CRON_SYSTEM" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: CRON_SYSTEM ('cron')"
+        $BIN/v-change-sys-config-value 'CRON_SYSTEM' 'cron'
+    fi
+
+    # Backend port
+    if [ -z "$BACKEND_PORT" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: BACKEND_PORT ('8083')"
+        $BIN/v-change-sys-port '8083' >/dev/null 2>&1
+    fi
+
+    # Upgrade: Send email notification
+    if [ -z "$UPGRADE_SEND_EMAIL" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL ('true')"
+        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL' 'true'
+    fi
+
+    # Upgrade: Send email notification
+    if [ -z "$UPGRADE_SEND_EMAIL_LOG" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL_LOG ('false')"
+        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL_LOG' 'false'
+    fi
+
+    # File Manager
+    if [ -z "$FILE_MANAGER" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: FILE_MANAGER ('true')"
+        echo "[ ! ] File Manager is enabled but not installed, repairing components..."
+        $BIN/v-add-sys-filemanager quiet
+    fi
+    
+    # Support for ZSTD / GZIP Change
+    if [ -z "$BACKUP_MODE" ]; then
+        echo "[ ! ] Setting zstd backup compression type as default..."
+        $BIN/v-change-sys-config-value "BACKUP_MODE" "zstd"
+    fi
+    
+    # Login style switcher
+    if [ -z "$LOGIN_STYLE" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: LOGIN_STYLE ('default')"
+        $BIN/v-change-sys-config-value "LOGIN_STYLE" "default"
+    fi
+    
+    # Webmail clients
+    if [ -z "$WEBMAIL_SYSTEM" ]; then
+        if [ -d "/var/lib/roundcube" ]; then 
+            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('roundcube')"
+            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" "roundcube"
+        else
+            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('')"
+            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" ""
+        fi
+    fi
+
+    # Inactive session timeout
+    if [ -z "$INACTIVE_SESSION_TIMEOUT" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: INACTIVE_SESSION_TIMEOUT ('60')"
+        $BIN/v-change-sys-config-value "INACTIVE_SESSION_TIMEOUT" "60"
+    fi
+
+    # Enforce subdomain ownership
+    if [ -z "$ENFORCE_SUBDOMAIN_OWNERSHIP" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: ENFORCE_SUBDOMAIN_OWNERSHIP ('yes')"
+        $BIN/v-change-sys-config-value "ENFORCE_SUBDOMAIN_OWNERSHIP" "yes"
+    fi
+
+    # API access allowed IP's
+    if [ "$API" = "yes" ]; then
+        check_api_key=$(grep "API_ALLOWED_IP" $HESTIA/conf/hestia.conf)
+        if [ -z "$check_api_key" ]; then
+            if [ -z "$API_ALLOWED_IP" ]; then
+                echo "[ ! ] Adding missing variable to hestia.conf: API_ALLOWED_IP ('allow-all')"        
+                $BIN/v-change-sys-config-value "API_ALLOWED_IP" "allow-all"
+            fi
+        fi
+    fi
+}

+ 5 - 143
func/upgrade.sh

@@ -2,6 +2,9 @@
 
 # Hestia Control Panel - Upgrade Control Script
 
+# Import system health check and repair library
+source $HESTIA/func/syshealth.sh
+
 #####################################################################
 #######                Functions & Initialization             #######
 #####################################################################
@@ -16,6 +19,7 @@ is_debug_build() {
 }
 
 upgrade_health_check() {
+    
     echo "============================================================================="
     echo "[ ! ] Performing system health check before proceeding with installation...  "
     # Perform basic health check against hestia.conf to ensure that
@@ -30,143 +34,8 @@ upgrade_health_check() {
         echo
     fi
 
-    # Release branch
-    if [ -z "$RELEASE_BRANCH" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: RELEASE_BRANCH ('release')"
-        $BIN/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
-    fi
-
-    # Webmail alias
-    if [ ! -z "$IMAP_SYSTEM" ]; then
-        if [ -z "$WEBMAIL_ALIAS" ]; then
-            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_ALIAS ('webmail')"
-            $BIN/v-change-sys-config-value 'WEBMAIL_ALIAS' 'webmail'
-        fi
-    fi
-
-    # phpMyAdmin/phpPgAdmin alias
-    if [ ! -z "$DB_SYSTEM" ]; then
-        if [ "$DB_SYSTEM" = "mysql" ]; then
-            if [ -z "$DB_PMA_ALIAS" ]; then 
-                echo "[ ! ] Adding missing variable to hestia.conf: DB_PMA_ALIAS ('phpMyAdmin')"
-                $BIN/v-change-sys-config-value 'DB_PMA_ALIAS' 'phpMyAdmin'
-            fi
-        fi
-        if [ "$DB_SYSTEM" = "pgsql" ]; then
-            if [ -z "$DB_PGA_ALIAS" ]; then 
-                echo "[ ! ] Adding missing variable to hestia.conf: DB_PGA_ALIAS ('phpPgAdmin')"
-                $BIN/v-change-sys-config-value 'DB_PGA_ALIAS' 'phpPgAdmin'
-            fi
-        fi
-    fi
-
-    # Backup compression level
-    if [ -z "$BACKUP_GZIP" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: BACKUP_GZIP ('9')"
-        $BIN/v-change-sys-config-value 'BACKUP_GZIP' '9'
-    fi
+    syshealth_repair_system_config
 
-    # Theme
-    if [ -z "$THEME" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: THEME ('default')"
-        $BIN/v-change-sys-config-value 'THEME' 'default'
-    fi
-
-    # Default language
-    if [ -z "$LANGUAGE" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: LANGUAGE ('en')"
-        $BIN/v-change-sys-language 'en'
-    fi
-
-    # Disk Quota
-    if [ -z "$DISK_QUOTA" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: DISK_QUOTA ('no')"
-        $BIN/v-change-sys-config-value 'DISK_QUOTA' 'no'
-    fi
-
-    # CRON daemon
-    if [ -z "$CRON_SYSTEM" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: CRON_SYSTEM ('cron')"
-        $BIN/v-change-sys-config-value 'CRON_SYSTEM' 'cron'
-    fi
-
-    # Backend port
-    if [ -z "$BACKEND_PORT" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: BACKEND_PORT ('8083')"
-        $BIN/v-change-sys-port '8083' >/dev/null 2>&1
-    fi
-
-    # Upgrade: Send email notification
-    if [ -z "$UPGRADE_SEND_EMAIL" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL ('true')"
-        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL' 'true'
-    fi
-
-    # Upgrade: Send email notification
-    if [ -z "$UPGRADE_SEND_EMAIL_LOG" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL_LOG ('false')"
-        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL_LOG' 'false'
-    fi
-
-    # File Manager
-    if [ -z "$FILE_MANAGER" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: FILE_MANAGER ('true')"
-        echo "[ ! ] File Manager is enabled but not installed, repairing components..."
-        $BIN/v-add-sys-filemanager quiet
-    fi
-    
-    # Support for ZSTD / GZIP Change
-    if [ -z "$BACKUP_MODE" ]; then
-        echo "[ ! ] Setting zstd backup compression type as default..."
-        $BIN/v-change-sys-config-value "BACKUP_MODE" "zstd"
-    fi
-    
-    # Login style switcher
-    if [ -z "$LOGIN_STYLE" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: LOGIN_STYLE ('default')"
-        $BIN/v-change-sys-config-value "LOGIN_STYLE" "default"
-    fi
-    
-    # Webmail clients
-    if [ -z "$WEBMAIL_SYSTEM" ]; then
-        if [ -d "/var/lib/roundcube" ]; then 
-            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('roundcube')"
-            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" "roundcube"
-        else
-            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('')"
-            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" ""
-        fi
-    fi
-
-    # Inactive session timeout
-    if [ -z "$INACTIVE_SESSION_TIMEOUT" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: INACTIVE_SESSION_TIMEOUT ('60')"
-        $BIN/v-change-sys-config-value "INACTIVE_SESSION_TIMEOUT" "60"
-    fi
-
-    # Enforce Subdomain ownership
-    if [ -z "$ENFORCE_SUBDOMAIN_OWNERSHIP" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: ENFORCE_SUBDOMAIN_OWNERSHIP ('yes')"
-        $BIN/v-change-sys-config-value "ENFORCE_SUBDOMAIN_OWNERSHIP" "yes"
-    fi
-
-    # Enable read-only access to the System Administrator account for other administrators
-    if [ -z "$RESTRICTED_ADMIN" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: RESTRICTED_ADMIN ('yes')"
-        $BIN/v-change-sys-config-value 'RESTRICTED_ADMIN' 'yes'
-    fi
-
-    # Debug Mode
-    if [ -z "$DEBUG_MODE" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: DEBUG_MODE ('false')"
-        $BIN/v-change-sys-config-value "DEBUG_MODE" "false"
-    fi
-    # API Allowed IP
-    if [ -z "$API_ALLOWED_IP" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: API_ALLOWED_IP ('allow-all')"        
-        $BIN/v-change-sys-config-value "API_ALLOWED_IP" "allow-all"
-    fi  
-    
     echo "[ * ] Health check complete. Starting upgrade from $VERSION to $new_version..."
     echo "============================================================================="
 }
@@ -698,13 +567,6 @@ upgrade_rainloop(){
     fi
 }
 
-disable_api(){
-    if [ "$API" = "no" ]; then
-        echo "[ ! ] Disable Api..."
-        sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
-        $HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
-    fi
-}
 upgrade_rebuild_web_templates() {
     if [ "$UPGRADE_UPDATE_WEB_TEMPLATES" = "true" ]; then
         echo "[ ! ] Updating default web domain templates..."

+ 2 - 2
install/hst-install-debian.sh

@@ -1637,7 +1637,7 @@ echo "[ * ] Install Roundcube..."
 
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
     $HESTIA/bin/v-add-sys-roundcube 
-    echo " WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
 fi
 
 #----------------------------------------------------------#
@@ -1646,7 +1646,7 @@ fi
 
 if [ "$api" = "yes" ]; then
     echo "API='yes'" >> $HESTIA/conf/hestia.conf
-    echo "API_ALLOWED_IP='127.0.0.1'" >> $HESTIA/conf/hestia.conf
+    echo "API_ALLOWED_IP=''" >> $HESTIA/conf/hestia.conf
 else
     $HESTIA/bin/v-change-sys-api disable
 fi

+ 2 - 2
install/hst-install-ubuntu.sh

@@ -1661,7 +1661,7 @@ echo "[ * ] Install Roundcube..."
 
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
     $HESTIA/bin/v-add-sys-roundcube 
-    echo " WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
 fi
 
 
@@ -1671,7 +1671,7 @@ fi
 
 if [ "$api" = "yes" ]; then
     echo "API='yes'" >> $HESTIA/conf/hestia.conf
-    echo "API_ALLOWED_IP='127.0.0.1'" >> $HESTIA/conf/hestia.conf
+    echo "API_ALLOWED_IP=''" >> $HESTIA/conf/hestia.conf
 else
     $HESTIA/bin/v-change-sys-api disable
 fi

+ 5 - 15
install/upgrade/versions/1.4.0.sh

@@ -106,22 +106,12 @@ if [ -f /etc/apt/sources.list.d/postgresql.list ]; then
     sed -i 's|deb https://apt.postgresql.org/pub/repos/apt/|deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/|g' /etc/apt/sources.list.d/postgresql.list
 fi
 
-# New configuration value for enforcing subdomain ownership
-check=$(cat $HESTIA/conf/hestia.conf | grep 'ENFORCE_SUBDOMAIN_OWNERSHIP');
-if [ -z "$check" ]; then 
-    echo "[ * ] Setting ENFORCE_SUBDOMAIN_OWNERSHIP to no..."
-    echo "ENFORCE_SUBDOMAIN_OWNERSHIP='no'" >> $HESTIA/conf/hestia.conf
-fi
-
-# New API feature to set allowed IPs
-if [ "$api" = "yes" ]; then
-    check=$(cat $HESTIA/conf/hestia.conf | grep 'API_ALLOWED_IP');
-    if [ -z "$check" ]; then 
-        echo "[ * ] Setting API_ALLOWED_IP to allow-all..."
-        echo "API_ALLOWED_IP='allow-all'" >> $HESTIA/conf/hestia.conf
+# Remove API file if API is set to "no"
+if [ "$API" = "no" ]; then
+    if [ -f "$HESTIA/web/api/index.php" ]; then
+        echo "[ * ] Disabling API access..."
+        $HESTIA/bin/v-change-sys-api remove
     fi
-else
-    $HESTIA/bin/v-change-sys-api disable
 fi
 
 

+ 0 - 2
src/deb/hestia/postinst

@@ -72,8 +72,6 @@ upgrade_roundcube | tee -a $LOG
 # Upgrade Rainloop if applicable
 upgrade_rainloop | tee -a $LOG
 
-# Check disabled API
-disable_api | tee -a $LOG
 # Set new version number in hestia.conf
 upgrade_set_version $new_version
 

+ 5 - 0
web/css/src/themes/default.css

@@ -2822,6 +2822,11 @@ a.vst-text:active b{
   width: 360px;
 }
 
+.vst-textinput.short.console {
+  height: 80px;
+  overflow: scroll;
+}
+
 #advanced-options .console{
   width: 833px;
   height: 600px;

File diff suppressed because it is too large
+ 0 - 0
web/css/themes/default.min.css


+ 3 - 3
web/templates/admin/add_web.html

@@ -373,7 +373,7 @@
                                     </tr>
                                     <tr>
                                         <td class="step-left">
-                                            <textarea size="20" class="vst-textinput short" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                            <textarea size="20" class="vst-textinput short console" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                         </td>
                                     </tr>
                                     <tr>
@@ -383,7 +383,7 @@
                                     </tr>
                                     <tr>
                                         <td class="step-left">
-                                            <textarea size="20" class="vst-textinput short" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                            <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                         </td>
                                     </tr>
                                     <tr>
@@ -393,7 +393,7 @@
                                     </tr>
                                     <tr>
                                         <td class="step-left">
-                                            <textarea size="20" class="vst-textinput short" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                            <textarea size="20" class="vst-textinput short console" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                         </td>
                                     </tr>
                                 </table>

+ 3 - 3
web/templates/admin/edit_mail.html

@@ -140,7 +140,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -150,7 +150,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -160,7 +160,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <?

+ 2 - 2
web/templates/admin/edit_server.html

@@ -885,7 +885,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -895,7 +895,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>

+ 3 - 3
web/templates/admin/edit_web.html

@@ -256,7 +256,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -266,7 +266,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -276,7 +276,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <?

+ 1 - 1
web/templates/admin/list_key.html

@@ -27,7 +27,7 @@
   ?>
   <div class="l-unit header animated fadeIn">
     <div class="l-unit__col l-unit__col--right">
-      <div class="clearfix l-unit__stat-col--left wide-3"><b><?=$data[$key]['ID'];?></b></div>
+      <div class="clearfix l-unit__stat-col--left wide-3"><b><?=htmlspecialchars($data[$key]['ID']);?></b></div>
           <div class="clearfix l-unit__stat-col--left text-left compact-2">
             <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
               <div class="actions-panel clearfix">

+ 3 - 3
web/templates/user/edit_web.html

@@ -261,7 +261,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -271,7 +271,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -281,7 +281,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <?

Some files were not shown because too many files changed in this diff