do not error out on basic auth tomboyosxfix github/tomboyosxfix
authorChristian Weiske <cweiske@cweiske.de>
Mon, 1 Dec 2014 17:28:09 +0000 (18:28 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 1 Dec 2014 17:28:09 +0000 (18:28 +0100)
lib/oauth.php

index 3cd695c..b7239ba 100644 (file)
@@ -162,7 +162,7 @@ class OAuth
         //$_SERVER['REDIRECT_HTTP_AUTHORIZATION'] = $_SERVER['HTTP_AUTHORIZATION'];
 
         if (isset($_SERVER['HTTP_AUTHORIZATION'])
-            && $_SERVER['HTTP_AUTHORIZATION'] == ''
+            && strtolower(substr($_SERVER['HTTP_AUTHORIZATION'], 0, 6)) != 'oauth '
         ) {
             //work around bug https://bugs.php.net/bug.php?id=68168
             //#68168: HTTP Basic auth and empty auth header reported