File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 105105 // Flush field values on success
106106 if (empty ($ _SESSION ['error_msg ' ])) {
107107 $ _SESSION ['ok_msg ' ] = sprintf (_ ('USER_CREATED_OK ' ),htmlentities ($ _POST ['v_username ' ]),htmlentities ($ _POST ['v_username ' ]));
108- $ _SESSION ['ok_msg ' ] .= " / <a href=/login/?loginas= " .htmlentities ($ _POST ['v_username ' ])."> " . _ ('login as ' ) ." " .htmlentities ($ _POST ['v_username ' ]). "</a> " ;
108+ $ _SESSION ['ok_msg ' ] .= " / <a href=/login/?loginas= " .htmlentities ($ _POST ['v_username ' ])."&token= " . htmlentities ( $ _SESSION [ ' token ' ]). " > " . _ ('login as ' ) ." " .htmlentities ($ _POST ['v_username ' ]). "</a> " ;
109109 unset($ v_username );
110110 unset($ v_password );
111111 unset($ v_email );
Original file line number Diff line number Diff line change 1616
1717// Login as someone else
1818if (isset ($ _SESSION ['user ' ])) {
19+ if (empty ($ _GET ['loginas ' ]) ){
20+ header ("Location: /list/web/ " );
21+ exit ;
22+ }
1923 if ($ _SESSION ['user ' ] == 'admin ' && !empty ($ _GET ['loginas ' ])) {
2024 exec (HESTIA_CMD . "v-list-user " .escapeshellarg ($ _GET ['loginas ' ])." json " , $ output , $ return_var );
2125 if ( $ return_var == 0 ) {
3438}
3539
3640function authenticate_user ($ user , $ password , $ twofa = '' ){
41+ unset($ _SESSION ['login ' ]);
3742 if (isset ($ _SESSION ['token ' ]) && isset ($ _POST ['token ' ]) && $ _POST ['token ' ] == $ _SESSION ['token ' ]) {
3843 $ v_user = escapeshellarg ($ user );
3944 $ v_ip = escapeshellarg ($ _SERVER ['REMOTE_ADDR ' ]);
Original file line number Diff line number Diff line change 11<?php
2-
32session_start ();
43
54if (!empty ($ _SESSION ['look ' ])) {
5+
66 unset($ _SESSION ['look ' ]);
7+ header ("Location: / " );
78} else {
89 session_destroy ();
10+ header ("Location: /login/ " );
911}
10-
11- header ("Location: /login/ " );
1212exit ;
1313?>
You can’t perform that action at this time.
0 commit comments