File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1111 exit ();
1212}
1313
14- // If the session has the same reset token as the current request prevent restarting again.
15- // This happens when the server is restarted, the admin panel goes down and the browser reloads
16- // the /restart/index.php page once the server goes online causing restart loop .
14+ // If the stored reset token matches the current request one it means that we need
15+ // to prevent the action because the browser automatically reloaded the page when
16+ // the server turned on. This will prevent duplicate restarts .
1717$ reset_token_dir = '/var/tmp/ ' ;
1818if (isset ($ _GET ['system_reset_token ' ]) && is_numeric ($ _GET ['system_reset_token ' ])) {
1919 clearstatcache ();
2828 if (!empty ($ _GET ['hostname ' ])) {
2929 touch ($ reset_token_file );
3030 $ _SESSION ['error_msg ' ] = 'The system is going down for reboot NOW! ' ;
31- touch ($ reset_token_file . '_persistent ' );
3231 exec (HESTIA_CMD . "v-restart-system yes " , $ output , $ return_var );
3332 }
3433 unset($ output );
You can’t perform that action at this time.
0 commit comments