From 8343d71aa1dbc36d3f888c7a31163acbfac43292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Poyet?= Date: Thu, 28 Nov 2024 13:05:58 +0100 Subject: [PATCH] fix: receive authorization header independent of lower or upper case --- local/o365/lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/local/o365/lib.php b/local/o365/lib.php index 565c3dec6..aa078a075 100644 --- a/local/o365/lib.php +++ b/local/o365/lib.php @@ -272,8 +272,9 @@ function local_o365_get_auth_token() { if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); - if (isset($headers['Authorization'])) { - $authtoken = substr($headers['Authorization'], 7); + $headers = array_change_key_case($headers, CASE_LOWER); + if (isset($headers['authorization'])) { + $authtoken = substr($headers['authorization'], 7); } }