Skip to content

Commit e61cb38

Browse files
authored
Merge pull request hestiacp#2865 from jaapmarcus/fix/2483
2483 [Bug] "Error: b2 failed to upload" in an endless job that fills the disk
2 parents 91bb970 + f2c6c1b commit e61cb38

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

bin/v-add-backup-host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ if [ $type != 'local' ] && [ $type != 'b2' ]; then
230230
chmod 660 $HESTIA/conf/$type.backup.conf
231231
elif [ $type == 'b2' ]; then
232232
new_timestamp
233-
str="BUCKET='$host'\nB2_KEYID='$user'\nB2_KEY='$password'"
233+
str="BUCKET='$host'\nB2_KEYID='$user'\nB2_KEY='$raw_password'"
234234
str="$str\nTIME='$time'\nDATE='$date'"
235235
echo -e "$str" > $HESTIA/conf/$type.backup.conf
236236
chmod 660 $HESTIA/conf/$type.backup.conf

bin/v-backup-user

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,7 @@ if [ -n "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
348348
cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.tpl template/$PROXY_SYSTEM/
349349
cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.stpl template/$PROXY_SYSTEM/
350350
fi
351-
352-
# Backup custom config / backup LE config
353-
for sconfig in $(ls $HOMEDIR/$user/conf/web/|grep ".$domain.conf"); do
354-
cp $HOMEDIR/$user/conf/web/$sconfig conf/
355-
done
356-
351+
357352
# Backup ssl certificates
358353
if [ "$SSL" = 'yes' ] ; then
359354
cp $HOMEDIR/$user/conf/web/$domain/ssl/$domain.* conf/

web/edit/server/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@
764764
$v_backup_port = quoteshellarg($_POST['v_backup_port']);
765765
$v_backup_type = quoteshellarg($_POST['v_backup_type']);
766766
$v_backup_username = quoteshellarg($_POST['v_backup_username']);
767-
$v_backup_password = escapeshellcmd($_POST['v_backup_password']);
767+
$v_backup_password = quoteshellarg($_POST['v_backup_password']);
768768
$v_backup_bpath = quoteshellarg($_POST['v_backup_bpath']);
769769
exec(HESTIA_CMD."v-add-backup-host ". $v_backup_type ." ". $v_backup_host ." ". $v_backup_username ." ". $v_backup_password ." ". $v_backup_bpath." ".$v_backup_port, $output, $return_var);
770770
check_return_code($return_var, $output);
@@ -824,7 +824,7 @@
824824
$v_backup_port = quoteshellarg($_POST['v_backup_port']);
825825
$v_backup_type = quoteshellarg($_POST['v_backup_type']);
826826
$v_backup_username = quoteshellarg($_POST['v_backup_username']);
827-
$v_backup_password = escapeshellcmd($_POST['v_backup_password']);
827+
$v_backup_password = quoteshellarg($_POST['v_backup_password']);
828828
$v_backup_bpath = quoteshellarg($_POST['v_backup_bpath']);
829829
exec(HESTIA_CMD."v-add-backup-host ". $v_backup_type ." ". $v_backup_host ." ". $v_backup_username ." ". $v_backup_password ." ". $v_backup_bpath." ".$v_backup_port, $output, $return_var);
830830
check_return_code($return_var, $output);
@@ -881,7 +881,7 @@
881881
$v_backup_port = quoteshellarg($_POST['v_backup_port']);
882882
$v_backup_type = quoteshellarg($_POST['v_backup_type']);
883883
$v_backup_username = quoteshellarg($_POST['v_backup_username']);
884-
$v_backup_password = escapeshellcmd($_POST['v_backup_password']);
884+
$v_backup_password = quoteshellarg($_POST['v_backup_password']);
885885
$v_backup_bpath = quoteshellarg($_POST['v_backup_bpath']);
886886
exec(HESTIA_CMD."v-add-backup-host ". $v_backup_type ." ". $v_backup_host ." ". $v_backup_username ." ". $v_backup_password ." ". $v_backup_bpath." ".$v_backup_port, $output, $return_var);
887887
check_return_code($return_var, $output);

0 commit comments

Comments
 (0)