Commit abf379d4 authored by Manfred Kutas's avatar Manfred Kutas

ZP-864 Do not convert if charset encoding is already UTF-8.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 6811dae8
......@@ -256,7 +256,7 @@ class Request {
ZLog::Write(LOGLEVEL_ERROR, "Request->ProcessHeaders(): mb_detect_encoding failed to detect the Authorization header charset. It's possible that user won't be able to login.");
}
}
if ($encoding) {
if ($encoding && stripos($encoding, "utf-8") === false) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Request->ProcessHeaders(): mb_detect_encoding detected '%s' charset. Authorization header will be converted to UTF-8 from it.", $encoding));
self::$authUser = mb_convert_encoding(self::$authUser, "UTF-8", $encoding);
self::$authPassword = mb_convert_encoding(self::$authPassword, "UTF-8", $encoding);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment