Skip to content

Commit 090608a

Browse files
authored
Merge pull request hestiacp#1632 from lazzurs/fix/case-insensitive-password-sftp-backup
Changing expect to be case insensitive in SFTP
2 parents e1a66e2 + 8e3ca01 commit 090608a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/v-add-backup-host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sftpc() {
4949
set count 0
5050
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$port $user@$host
5151
expect {
52-
"password:" {
52+
-nocase "password:" {
5353
send "$password\r"
5454
exp_continue
5555
}

func/backup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ sftpc() {
194194
spawn /usr/bin/sftp -o StrictHostKeyChecking=no \
195195
-o Port=$PORT $USERNAME@$HOST
196196
expect {
197-
"password:" {
197+
-nocase "password:" {
198198
send "$PASSWORD\r"
199199
exp_continue
200200
}
@@ -457,4 +457,4 @@ b2_backup() {
457457
b2 delete-file-version $backup > /dev/null 2>&1
458458
done
459459
fi
460-
}
460+
}

0 commit comments

Comments
 (0)