Allow use of REMOTE_USER/REDIRECT_REMOTE_USER for authentication. Props yonosoytu. fixes #7361

git-svn-id: http://svn.automattic.com/wordpress/trunk@9951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-28 21:04:48 +00:00
parent 5965de77b0
commit c62e75c601
1 changed files with 5 additions and 0 deletions

View File

@ -1469,6 +1469,11 @@ EOD;
if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
} else if (isset($_SERVER['REDIRECT_REMOTE_USER'])) {
// Workaround for setups that do not forward HTTP_AUTHORIZATION
// See http://trac.wordpress.org/ticket/7361
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode(substr($_SERVER['REDIRECT_REMOTE_USER'], 6)));
}
// If Basic Auth is working...