File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,9 @@ public function verifyAccessToken($token_param, $scope = NULL) {
466
466
* @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.2
467
467
* @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.3
468
468
*
469
+ * Old Android version bug (at least with version 2.2)
470
+ * @see http://code.google.com/p/android/issues/detail?id=6684
471
+ *
469
472
* We don't want to test this functionality as it relies on superglobals and headers:
470
473
* @codeCoverageIgnoreStart
471
474
*/
@@ -475,7 +478,10 @@ public function getBearerToken() {
475
478
}
476
479
elseif (function_exists ('apache_request_headers ' )) {
477
480
$ requestHeaders = apache_request_headers ();
478
-
481
+
482
+ // Server-side fix for bug in old Android versions (a nice side-effect of this fix means we don't care about capitalization for Authorization)
483
+ $ requestHeaders = array_combine (array_map ('ucwords ' , array_keys ($ requestHeaders )), array_values ($ requestHeaders ));
484
+
479
485
if (isset ($ requestHeaders ['Authorization ' ])) {
480
486
$ headers = trim ($ requestHeaders ['Authorization ' ]);
481
487
}
You can’t perform that action at this time.
0 commit comments