From bea7ccd25e967909b0cb08eab07865cb94bcdc01 Mon Sep 17 00:00:00 2001 From: Alexandr Loskutov Date: Thu, 18 Jan 2018 14:32:25 +0200 Subject: [PATCH] Fix backup restore --- bin/v-restore-user | 4 ++-- func/main.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/v-restore-user b/bin/v-restore-user index accad1d42..b5df63212 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -374,8 +374,8 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then # Copying ssl certificates if [ "$SSL" = 'yes' ]; then for crt in $(ls $tmpdir/web/$domain/conf |grep ssl); do - crt=$(echo "$crt" |sed "s/ssl.//") - cp -f $tmpdir/web/$domain/conf/ssl.$crt $USER_DATA/ssl/$crt + crt=$(echo $crt|sed -e "s/ssl.//") + cp -f $tmpdir/web/$domain/conf/$crt $USER_DATA/ssl/$crt done fi diff --git a/func/main.sh b/func/main.sh index 11486a5b2..4d48293db 100644 --- a/func/main.sh +++ b/func/main.sh @@ -634,8 +634,8 @@ is_date_format_valid() { is_dbuser_format_valid() { exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]" if [ 17 -le ${#1} ]; then - check_result $E_INVALID "mysql username can be up to 16 characters long" - fi + check_result $E_INVALID "mysql username can be up to 16 characters long" + fi if [[ "$1" =~ $exclude ]]; then check_result $E_INVALID "invalid $2 format :: $1" fi @@ -770,7 +770,7 @@ is_name_format_valid() { # Object validator is_object_format_valid() { - if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then + if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,64}[[:alnum:]]$ ]]; then check_result $E_INVALID "invalid $2 format :: $1" fi }