Another fix for bug #10
authorChristian Weiske <cweiske@cweiske.de>
Tue, 7 Oct 2014 04:53:52 +0000 (06:53 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 7 Oct 2014 04:53:52 +0000 (06:53 +0200)
lib/oauth.php

index 41af349..9fea742 100644 (file)
@@ -161,8 +161,10 @@ class OAuth
         //$_SERVER['REDIRECT_HTTP_AUTHORIZATION'] = $_SERVER['HTTP_AUTHORIZATION'];
         //unset($_SERVER['HTTP_AUTHORIZATION']);
         if ((isset($_SERVER['HTTP_AUTHORIZATION'])
+                && strlen($_SERVER['HTTP_AUTHORIZATION'])
                 && strtolower(substr($_SERVER['HTTP_AUTHORIZATION'], 0, 5)) != 'oauth')
             || (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])
+                && strlen($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])
                 && strtolower(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 0, 5)) != 'oauth')
         ) {
             //work around bug https://bugs.php.net/bug.php?id=68168