mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Allow use of REMOTE_USER/REDIRECT_REMOTE_USER for authentication. Props yonosoytu. fixes #7361
git-svn-id: https://develop.svn.wordpress.org/trunk@9951 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ab6e1f7344
commit
f33754255f
@ -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...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user