mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 15:16:29 +01:00
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:
parent
5965de77b0
commit
c62e75c601
@ -1469,6 +1469,11 @@ EOD;
|
|||||||
if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
|
if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
|
||||||
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
|
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
|
||||||
explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
|
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...
|
// If Basic Auth is working...
|
||||||
|
Loading…
Reference in New Issue
Block a user