File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed
Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ All notable changes to this project will be documented in this file.
4141- Fixed an issue with Restore Failed on Domains with Mail Setups using SSL (#1069 )
4242- Fixed an issue with PHPMyAdmin button (#1078 )
4343- Changed WordPress name in Webapp installer (#1074 )
44+ - Add a free disk space validation during backup routine (#1115 )
45+
4446
4547## [ 1.2.3] - Service Release
4648### Features
Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ start_time=$(date '+%s')
5555subj=" $user → backup failed"
5656email=$( grep CONTACT $HESTIA /data/users/admin/user.conf | cut -f 2 -d \' )
5757
58+ # Validate available disk space (take usage * 2, due to the backup handling)
59+ let u_disk=$( grep " U_DISK=" $HESTIA /data/users/$user /user.conf | cut -f 2 -d \' ) * 2
60+ let v_disk=$(( $(stat - f -- format= "% a*% S" $BACKUP )) )/1024/1024
61+
62+ if [ " $u_disk " -gt " $v_disk " ]; then
63+ echo " not enough diskspace available to perform the backup." | $SENDMAIL -s " $subj " $email $notify
64+ check_result $E_LIMIT " not enough diskspace available to perform the backup."
65+ fi
66+
5867if [ -z " $BACKUP_TEMP " ]; then
5968 BACKUP_TEMP=$BACKUP
6069fi
Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ if [ "$FTP_SYSTEM" == "proftpd" ]; then
3434 if [ -e /etc/proftpd/proftpd.conf ]; then
3535 rm /etc/proftpd/proftpd.conf
3636 fi
37- if [ -e /etc/proftpd/tlss .conf ]; then
37+ if [ -e /etc/proftpd/tls .conf ]; then
3838 rm /etc/proftpd/tls.conf
3939 fi
4040
4141 cp -f $HESTIA_INSTALL_DIR /proftpd/proftpd.conf /etc/proftpd/
4242 cp -f $HESTIA_INSTALL_DIR /proftpd/tls.conf /etc/proftpd/
4343
44- fi
44+ fi
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ function authenticate_user(){
9898 if ($ data [$ _POST ['user ' ]]['TWOFA ' ] != '' ) {
9999 if (empty ($ _POST ['twofa ' ])){
100100 return false ;
101- }else {
101+ } else {
102102 $ v_twofa = $ _POST ['twofa ' ];
103103 exec (HESTIA_CMD ."v-check-user-2fa " .$ v_user ." " .$ v_twofa , $ output , $ return_var );
104104 unset($ output );
@@ -148,6 +148,13 @@ function authenticate_user(){
148148 }
149149 }
150150 }
151+ } else {
152+ unset($ _POST );
153+ unset($ _GET );
154+ unset($ _SESSION );
155+ session_destroy ();
156+ session_start ();
157+ return false ;
151158 }
152159}
153160
@@ -190,4 +197,4 @@ function authenticate_user(){
190197} else {
191198 require_once ('../templates/login.html ' );
192199}
193- ?>
200+ ?>
You can’t perform that action at this time.
0 commit comments