Browse Source

Merge pull request #6 from serghey-rodin/master

Update from master
myvesta 7 years ago
parent
commit
63e7e607c7
5 changed files with 7 additions and 6 deletions
  1. 2 2
      bin/v-rebuild-web-domains
  2. 2 2
      func/domain.sh
  3. 1 1
      func/main.sh
  4. 1 1
      install/rhel/6/roundcube/vesta.php
  5. 1 0
      web/inc/i18n/es.php

+ 2 - 2
bin/v-rebuild-web-domains

@@ -37,7 +37,7 @@ is_object_unsuspended 'user' 'USER' "$user"
 #----------------------------------------------------------#
 
 # Deleting old web configs
-sed -i "/.*\/$user\//d" /etc/$WEB_SYSTEM/conf.d/vesta.conf
+sed -i "/.*\/$user\/conf\/web\//d" /etc/$WEB_SYSTEM/conf.d/vesta.conf
 if [ -e "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"  ]; then
     rm $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf
 fi
@@ -47,7 +47,7 @@ fi
 
 # Deleting old proxy configs
 if [ ! -z "$PROXY_SYSTEM" ]; then
-    sed -i "/.*\/$user\//d" /etc/$PROXY_SYSTEM/conf.d/vesta.conf
+    sed -i "/.*\/$user\/conf\/web\//d" /etc/$PROXY_SYSTEM/conf.d/vesta.conf
 
     if [ -e "$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" ]; then
         rm $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf

+ 2 - 2
func/domain.sh

@@ -269,7 +269,7 @@ replace_web_config() {
     fi
 }
 
-# Delete web configuartion
+# Delete web configuration
 del_web_config() {
     conf="$HOMEDIR/$user/conf/web/$domain.$1.conf"
     if [[ "$2" =~ stpl$ ]]; then
@@ -291,7 +291,7 @@ del_web_config() {
     # clean-up for both config styles if there is no more domains
     web_domain=$(grep DOMAIN $USER_DATA/web.conf |wc -l)
     if [ "$web_domain" -eq '0' ]; then
-        sed -i "/.*\/$user\/.*/d" /etc/$1/conf.d/vesta.conf
+        sed -i "/.*\/$user\/conf\/web\//d" /etc/$1/conf.d/vesta.conf
         if [ -f "$conf" ]; then
             rm -f $conf
         fi

+ 1 - 1
func/main.sh

@@ -532,7 +532,7 @@ is_user_format_valid() {
 is_domain_format_valid() {
     object_name=${2-domain}
     exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]"
-    if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]]; then
+    if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]] || [[ $1 =~ "$(printf '\t')" ]]; then
         check_result $E_INVALID "invalid $object_name format :: $1"
     fi
 }

+ 1 - 1
install/rhel/6/roundcube/vesta.php

@@ -48,7 +48,7 @@ class rcube_vesta_password
         $context = stream_context_create();
 
         $result = stream_context_set_option($context, 'ssl', 'verify_peer', false);
-        result = stream_context_set_option($context, 'ssl', 'verify_peer_name', false);
+        $result = stream_context_set_option($context, 'ssl', 'verify_peer_name', false);
         $result = stream_context_set_option($context, 'ssl', 'verify_host', false);
         $result = stream_context_set_option($context, 'ssl', 'allow_self_signed', true);
 

+ 1 - 0
web/inc/i18n/es.php

@@ -21,6 +21,7 @@ $LANG['es'] = array(
     'Services'  => 'Servicios',
     'Firewall' => 'Cortafuegos',
     'Updates'  => 'Actualizaciones',
+    'Apps'  => 'Aplicaciones',
     'Log in'  => 'Iniciar Sesión',
     'Log out'  => 'Salir',