- Backported r5093

release-0.6
alecpl 13 years ago
parent d43d4bcf44
commit 9f61af3518

@ -5,7 +5,7 @@
* *
* Make use of an existing HTTP authentication and perform login with the existing user credentials * Make use of an existing HTTP authentication and perform login with the existing user credentials
* *
* @version 1.2 * @version 1.3
* @author Thomas Bruederli * @author Thomas Bruederli
*/ */
class http_authentication extends rcube_plugin class http_authentication extends rcube_plugin
@ -30,14 +30,20 @@ class http_authentication extends rcube_plugin
function authenticate($args) function authenticate($args)
{ {
// Allow entering other user data in login form,
// e.g. after log out (#1487953)
if (!empty($args['user'])) {
return $args;
}
if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
$args['user'] = $_SERVER['PHP_AUTH_USER']; $args['user'] = $_SERVER['PHP_AUTH_USER'];
$args['pass'] = $_SERVER['PHP_AUTH_PW']; $args['pass'] = $_SERVER['PHP_AUTH_PW'];
} }
$args['cookiecheck'] = false; $args['cookiecheck'] = false;
$args['valid'] = true; $args['valid'] = true;
return $args; return $args;
} }

Loading…
Cancel
Save