Update Session.php

The http headers according to rfc 2616 is iso-8859-1. This patch fixes the behavior when non-ascii characters are present in the header.

Signed-off-by: Marek Wójtowicz <Marek.Wojtowicz@agh.edu.pl>
This commit is contained in:
Marek-Wojtowicz 2022-01-11 22:33:18 +01:00 committed by backportbot[bot]
parent b4486d20f0
commit 457bb9b8ef

View file

@ -681,7 +681,7 @@ class Session implements IUserSession, Emitter {
// User does not exist
return false;
}
$name = isset($request->server['HTTP_USER_AGENT']) ? $request->server['HTTP_USER_AGENT'] : 'unknown browser';
$name = isset($request->server['HTTP_USER_AGENT']) ? utf8_encode($request->server['HTTP_USER_AGENT']) : 'unknown browser';
try {
$sessionId = $this->session->getId();
$pwd = $this->getPassword($password);