Fix handling of Basic Auth headers.

This commit is contained in:
Andrew McMillan 2012-07-04 18:58:14 +12:00
parent c846104d94
commit 622512e156

View File

@ -148,7 +148,7 @@ class DAViCalSession extends Session
* We allow basic auth to apply also, if present, though we check everything else first...
*/
if ( isset($_SERVER['PHP_AUTH_USER']) && !$this->logged_in && $_SERVER['PHP_AUTH_USER'] != "" && $_SERVER['PHP_AUTH_PW'] != "" && ! $_COOKIE['NoAutoLogin'] ) {
if ( $this->Login($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'],true)) {
if ( $this->Login($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'],false)) {
setcookie('NoAutoLogin',1,0);
return;
}