fix: Headers are case-sentitive, do not strtoupper

pull/3585/head
Hannah Ward 2018-10-02 15:40:28 +01:00
parent 056e0ae688
commit f5fbb3fb12
No known key found for this signature in database
GPG Key ID: 6F3BAD60DE190290
1 changed files with 0 additions and 1 deletions

View File

@ -816,7 +816,6 @@ class AppController extends Controller
$result = false;
if (Configure::read('Plugin.CustomAuth_enable')) {
$header = Configure::read('Plugin.CustomAuth_header') ? Configure::read('Plugin.CustomAuth_header') : 'Authorization';
$header = strtoupper($header);
$authName = Configure::read('Plugin.CustomAuth_name') ? Configure::read('Plugin.CustomAuth_name') : 'External authentication';
$headerNamespace = Configure::read('Plugin.CustomAuth_use_header_namespace') ? (Configure::read('Plugin.CustomAuth_header_namespace') ? Configure::read('Plugin.CustomAuth_header_namespace') : 'HTTP_') : '';
if (isset($server[$headerNamespace . $header]) && !empty($server[$headerNamespace . $header])) {