| 1 | | Maybe we could return true from rcmail::check_request() when {{{$_SESSION['request_tokens']}}} is empty? |
| | 1 | Maybe we could return true from rcmail::check_request() when {{{$_SESSION['request_tokens']}}} is empty or something like this patch: |
| | 2 | {{{ |
| | 3 | --- index.php (wersja 4607) |
| | 4 | +++ index.php (kopia robocza) |
| | 5 | @@ -75,7 +75,7 @@ |
| | 6 | |
| | 7 | // try to log in |
| | 8 | if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { |
| | 9 | - $request_valid = $_SESSION['temp'] && $RCMAIL->check_request(RCUBE_INPUT_POST, 'login'); |
| | 10 | + $request_valid = empty($RCMAIL->user->ID) || ($_SESSION['temp'] && $RCMAIL->check_request(RCUBE_INPUT_POST, 'login')); |
| | 11 | |
| | 12 | // purge the session in case of new login when a session already exists |
| | 13 | $RCMAIL->kill_session(); |
| | 14 | |
| | 15 | }}} |
| | 16 | I think token check is not needed when user is not logged in. |