Skip to content

Commit

Permalink
Fixed issue #7049: Webserver authentication not working when external…
Browse files Browse the repository at this point in the history
… access control is used
  • Loading branch information
c-schmitz committed Feb 15, 2013
1 parent 24a2676 commit 645ea65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/core/UserIdentity.php
Expand Up @@ -67,10 +67,13 @@ public function authenticate($sOneTimePassword='')
$this->errorCode = self::ERROR_NONE;
}
}
elseif(Yii::app()->getConfig("auth_webserver") === true && (isset($_SERVER['PHP_AUTH_USER'])||isset($_SERVER['LOGON_USER']))) // normal login through webserver authentication
elseif(Yii::app()->getConfig("auth_webserver") === true && (isset($_SERVER['PHP_AUTH_USER'])||isset($_SERVER['LOGON_USER']) ||isset($_SERVER['REMOTE_USER']))) // normal login through webserver authentication
{
if (isset($_SERVER['PHP_AUTH_USER'])) {
$sUser=$_SERVER['PHP_AUTH_USER'];
}
elseif (isset($_SERVER['REMOTE_USER'])) {
$sUser=$_SERVER['REMOTE_USER'];
} else {
$sUser = $_SERVER['LOGON_USER'];
$sUser = substr($sUser, strrpos($sUser, "\\")+1);
Expand Down

0 comments on commit 645ea65

Please sign in to comment.