diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-26 18:08:49 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-26 18:08:49 +0200 |
commit | 2b10371bdeb2c8a3d5cc2617ada5cf8195c264c9 (patch) | |
tree | f25b463c90992764887416c3082098fed6ecac65 /3rdparty/Sabre/HTTP/BasicAuth.php | |
parent | 40f95ffdf3edf9ab45c15bd5b9018d7f4d92baa9 (diff) | |
parent | 127796218314c6b1f19ba86f74caa913375aac8d (diff) | |
download | nextcloud-server-2b10371bdeb2c8a3d5cc2617ada5cf8195c264c9.tar.gz nextcloud-server-2b10371bdeb2c8a3d5cc2617ada5cf8195c264c9.zip |
fix merge conflicts
Diffstat (limited to '3rdparty/Sabre/HTTP/BasicAuth.php')
-rwxr-xr-x[-rw-r--r--] | 3rdparty/Sabre/HTTP/BasicAuth.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/3rdparty/Sabre/HTTP/BasicAuth.php b/3rdparty/Sabre/HTTP/BasicAuth.php index 35c22d22dc3..a747cc6a31b 100644..100755 --- a/3rdparty/Sabre/HTTP/BasicAuth.php +++ b/3rdparty/Sabre/HTTP/BasicAuth.php @@ -4,11 +4,11 @@ * HTTP Basic Authentication handler * * Use this class for easy http authentication setup - * + * * @package Sabre - * @subpackage HTTP - * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved. - * @author Evert Pot (http://www.rooftopsolutions.nl/) + * @subpackage HTTP + * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved. + * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ class Sabre_HTTP_BasicAuth extends Sabre_HTTP_AbstractAuth { @@ -22,7 +22,7 @@ class Sabre_HTTP_BasicAuth extends Sabre_HTTP_AbstractAuth { * * If nothing was supplied, 'false' will be returned * - * @return mixed + * @return mixed */ public function getUserPass() { @@ -33,12 +33,18 @@ class Sabre_HTTP_BasicAuth extends Sabre_HTTP_AbstractAuth { } - // Most other webservers + // Most other webservers $auth = $this->httpRequest->getHeader('Authorization'); + // Apache could prefix environment variables with REDIRECT_ when urls + // are passed through mod_rewrite + if (!$auth) { + $auth = $this->httpRequest->getRawServerValue('REDIRECT_HTTP_AUTHORIZATION'); + } + if (!$auth) return false; - if (strpos(strtolower($auth),'basic')!==0) return false; + if (strpos(strtolower($auth),'basic')!==0) return false; return explode(':', base64_decode(substr($auth, 6))); |