File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 697697 // Change INACTIVE_SESSION_TIMEOUT
698698 if (empty ($ _SESSION ['error_msg ' ])) {
699699 if ($ _POST ['v_inactive_session_timeout ' ] != $ _SESSION ['INACTIVE_SESSION_TIMEOUT ' ]) {
700- exec (HESTIA_CMD ."v-change-sys-config-value INACTIVE_SESSION_TIMEOUT " .escapeshellarg ($ _POST ['v_inactive_session_timeout ' ]), $ output , $ return_var );
701- check_return_code ($ return_var ,$ output );
702- unset($ output );
703- if (empty ($ _SESSION ['error_msg ' ])) $ v_login_style = $ _POST ['v_inactive_session_timeout ' ];
700+ if ($ _POST ['v_inactive_session_timeout ' ] < 1 ){
701+ $ _SESSION ['error_msg ' ] = _ ('Inactive session timeout can not lower then 1 minute ' );
702+ }else {
703+ exec (HESTIA_CMD ."v-change-sys-config-value INACTIVE_SESSION_TIMEOUT " .escapeshellarg ($ _POST ['v_inactive_session_timeout ' ]), $ output , $ return_var );
704+ check_return_code ($ return_var ,$ output );
705+ unset($ output );
706+ if (empty ($ _SESSION ['error_msg ' ])) $ v_login_style = $ _POST ['v_inactive_session_timeout ' ];
707+ }
704708 $ v_security_adv = 'yes ' ;
705709 }
706710 }
795799
796800 // Change POLICY_USER_VIEW_SUSPENDED
797801 if (empty ($ _SESSION ['error_msg ' ])) {
798- if ($ _POST ['v_policy_user_view_suspended ' ] != $ _SESSION ['POLICY_USER_VIEW_SUSPENDED ' ]) {
802+ if ($ _POST ['v_policy_user_view_suspended ' ] != $ _SESSION ['POLICY_USER_VIEW_SUSPENDED ' ] && ! empty ( $ _SESSION [ ' POLICY_USER_VIEW_SUSPENDED ' ]) ) {
799803 exec (HESTIA_CMD ."v-change-sys-config-value POLICY_USER_VIEW_SUSPENDED " .escapeshellarg ($ _POST ['v_policy_user_view_suspended ' ]), $ output , $ return_var );
800804 check_return_code ($ return_var ,$ output );
801805 unset($ output );
You can’t perform that action at this time.
0 commit comments