Fix so 401 error is returned only on failed logon requests (#7010)

pull/5989/merge
Aleksander Machniak 5 years ago
parent 4e840c7669
commit b8555ce4f3

@ -6,6 +6,7 @@ CHANGELOG Roundcube Webmail
- Fix PHP warning: "array_merge(): Expected parameter 2 to be an array, null given in sendmail.inc (#7003)
- Fix bug where cache keys could exceed length limit specified in db schema (#7004)
- Fix invalid Signature button state after escaping Mailvelope mode (#7015)
- Fix so 401 error is returned only on failed logon requests (#7010)
RELEASE 1.4.0
-------------

@ -234,7 +234,8 @@ if (empty($RCMAIL->user->ID)) {
$plugin = $RCMAIL->plugins->exec_hook('unauthenticated', array(
'task' => 'login',
'error' => $session_error,
'http_code' => !$session_error ? 401 : 200
// Return 401 only on failed logins (#7010)
'http_code' => empty($session_error) && !empty($error_message) ? 401 : 200
));
$RCMAIL->set_task($plugin['task']);

Loading…
Cancel
Save