[Pkg-owncloud-commits] [owncloud] 39/75: enable check for REDIRECT_HTTP_AUTHORIZATION to enable webdav connection for FastCGI hosted PHP
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:08:36 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.
commit 2a11400725c1f11ae133cb6cbbd0a07827142910
Author: Klaas Freitag <freitag at suse.de>
Date: Mon Nov 21 17:44:27 2011 +0100
enable check for REDIRECT_HTTP_AUTHORIZATION to enable webdav
connection for FastCGI hosted PHP
---
3rdparty/Sabre/HTTP/BasicAuth.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/3rdparty/Sabre/HTTP/BasicAuth.php b/3rdparty/Sabre/HTTP/BasicAuth.php
index 35c22d2..0f5bd6d 100644
--- a/3rdparty/Sabre/HTTP/BasicAuth.php
+++ b/3rdparty/Sabre/HTTP/BasicAuth.php
@@ -36,6 +36,15 @@ class Sabre_HTTP_BasicAuth extends Sabre_HTTP_AbstractAuth {
// Most other webservers
$auth = $this->httpRequest->getHeader('Authorization');
+ // Support PHP running as CGI which does not set the auth header automatically.
+ // Note: Redirect Rule is needed in .htaccess to make this work:
+ // RewriteEngine on
+ // RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+ //
+ if (!$auth && isSet($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
+ $auth = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
+ }
+
if (!$auth) return false;
if (strpos(strtolower($auth),'basic')!==0) return false;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list