Last active
January 27, 2016 20:21
-
-
Save josephdpurcell/74f0ccf0b595fb460cd8 to your computer and use it in GitHub Desktop.
Ref 833 Hotfix for hyphen/dash auth headers issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php b/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php | |
index 331281a..9d33d7a 100644 | |
--- a/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php | |
+++ b/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php | |
@@ -93,7 +93,7 @@ class TokenAuthentication extends Authentication { | |
// If we don't have a $key_name on either the URL or the in the headers, | |
// then check again using a hyphen instead of an underscore. This is due to | |
// new versions of Apache not accepting headers with underscores. | |
- if (empty($input[$key_name]) && $request->getHeaders()->get($key_name)->getValueString()) { | |
+ if (!$input[$key_name] && !$request->getHeaders()->get($key_name)->getValueString()) { | |
$key_name = str_replace('_', '-', $key_name); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment