Explorar o código

Fix special chars in password

Escaping special chars in password.
Possible fix for  this — https://github.com/hestiacp/hestiacp/issues/1230
Anton Pleskanovskyy %!s(int64=5) %!d(string=hai) anos
pai
achega
a84fd34cc2
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      bin/v-add-backup-host

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

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