File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -212,10 +212,13 @@ public function init($extra) {
212212 // other than Basic/Digest, so use an Apache-specific method to get the header
213213 if (!$ key && function_exists ('apache_request_headers ' )) {
214214 $ headers = apache_request_headers ();
215- if (isset ($ headers ['Authorization ' ])) {
215+ if (isset ($ headers ['Authorization ' ]) || isset ($ headers ['authorization ' ])) {
216+ $ val = isset ($ headers ['Authorization ' ])
217+ ? $ headers ['Authorization ' ]
218+ : $ headers ['authorization ' ];
216219 // Look for "Authorization: Bearer" from OAuth 2.0, and ignore everything else
217- if (preg_match ('/^bearer/i ' , $ headers [ ' Authorization ' ] , $ matches )) {
218- if (preg_match ('/^bearer +([a-z0-9]+)$/i ' , $ headers [ ' Authorization ' ] , $ matches )) {
220+ if (preg_match ('/^bearer/i ' , $ val , $ matches )) {
221+ if (preg_match ('/^bearer +([a-z0-9]+)$/i ' , $ val , $ matches )) {
219222 $ key = $ matches [1 ];
220223 }
221224 else {
You can’t perform that action at this time.
0 commit comments