summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-11-08 12:58:58 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-11-08 12:58:58 +0100
commit677b6c518a6ff6850d0e6f1fa0add1778b721189 (patch)
tree62ebd0aee22f70e92761ef39c918a95cc9909adf
parent4a05e8a7e8a39aee331a1d5bc45fbc1710ac6a15 (diff)
parenta96a22cc3e671181bee753c174ab134541ad3844 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
-rw-r--r--plugins/http_authentication/http_authentication.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php
index d86e1791c..83f29c84f 100644
--- a/plugins/http_authentication/http_authentication.php
+++ b/plugins/http_authentication/http_authentication.php
@@ -29,7 +29,7 @@ class http_authentication extends rcube_plugin
function startup($args)
{
- if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
+ if (!empty($_SERVER['PHP_AUTH_USER'])) {
$rcmail = rcmail::get_instance();
$rcmail->add_shutdown_function(array('http_authentication', 'shutdown'));
@@ -38,7 +38,8 @@ class http_authentication extends rcube_plugin
$args['action'] = 'login';
}
// Set user password in session (see shutdown() method for more info)
- else if (!empty($_SESSION['user_id']) && empty($_SESSION['password'])) {
+ else if (!empty($_SESSION['user_id']) && empty($_SESSION['password'])
+ && !empty($_SERVER['PHP_AUTH_PW'])) {
$_SESSION['password'] = $rcmail->encrypt($_SERVER['PHP_AUTH_PW']);
}
}
@@ -61,9 +62,10 @@ class http_authentication extends rcube_plugin
return $args;
}
- if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
+ if (!empty($_SERVER['PHP_AUTH_USER'])) {
$args['user'] = $_SERVER['PHP_AUTH_USER'];
- $args['pass'] = $_SERVER['PHP_AUTH_PW'];
+ if (!empty($_SERVER['PHP_AUTH_PW']))
+ $args['pass'] = $_SERVER['PHP_AUTH_PW'];
}
$args['cookiecheck'] = false;