chg: [config:customAuth_header] Default to upper case.

- See $_SERVER make passed headers upper case
pull/9303/head
Sami Mokaddem 2023-09-22 11:43:02 +02:00
parent a829ddc5cb
commit 28179ced9c
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 3 additions and 3 deletions

View File

@ -1104,7 +1104,7 @@ 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 = Configure::read('Plugin.CustomAuth_header') ? Configure::read('Plugin.CustomAuth_header') : 'AUTHORIZATION';
$authName = Configure::read('Plugin.CustomAuth_name') ? Configure::read('Plugin.CustomAuth_name') : 'External authentication';
if (
!Configure::check('Plugin.CustomAuth_use_header_namespace') ||

View File

@ -7312,7 +7312,7 @@ class Server extends AppModel
'CustomAuth_header' => array(
'level' => 2,
'description' => __('Set the header that MISP should look for here. If left empty it will default to the Authorization header.'),
'value' => 'Authorization',
'value' => 'AUTHORIZATION',
'test' => 'testForEmpty',
'type' => 'string',
'null' => true

View File

@ -90,7 +90,7 @@ if ($admin_view && $isSiteAdmin && $isTotp) {
}
if (Configure::read('Plugin.CustomAuth_enable') && !empty($user['User']['external_auth_key'])) {
$header = Configure::read('Plugin.CustomAuth_header') ?: 'Authorization';
$header = Configure::read('Plugin.CustomAuth_header') ?: 'AUTHORIZATION';
$table_data[] = array(
'key' => __('Customauth header'),
'html' => sprintf(