Skip to content

Commit a84fd34

Browse files
authored
Fix special chars in password
Escaping special chars in password. Possible fix for this — hestiacp#1230
1 parent 853fcb2 commit a84fd34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/v-add-backup-host

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
type=$1
1414
host=$2
1515
user=$3
16-
password=$4; HIDE=4
16+
raw_password=$4; HIDE=4
17+
password=$(perl -e 'print quotemeta shift(@ARGV)' "${raw_password}")
1718
path=${5-/backup}
1819
port=$6
1920

0 commit comments

Comments
 (0)