do not error out on basic auth
[grauphel.git] / lib / oauth.php
index 3cd695cc22dfc92d5122ac3d318b1a72d49cbdc0..b7239ba5786ed75252e26892176242aab34f286d 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