1
0
Эх сурвалжийг харах

Fix special chars in password

Escaping special chars in password.
Possible fix for  this — https://github.com/hestiacp/hestiacp/issues/1230
Anton Pleskanovskyy 5 жил өмнө
parent
commit
a84fd34cc2

+ 2 - 1
bin/v-add-backup-host

@@ -13,7 +13,8 @@
 type=$1
 type=$1
 host=$2
 host=$2
 user=$3
 user=$3
-password=$4; HIDE=4
+raw_password=$4; HIDE=4
+password=$(perl -e 'print quotemeta shift(@ARGV)' "${raw_password}")
 path=${5-/backup}
 path=${5-/backup}
 port=$6
 port=$6