Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek-Wojtowicz <54400070+Marek-Wojtowicz@users.noreply.github.com>2022-01-12 00:33:18 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-01-18 02:23:08 +0300
commit457bb9b8ef366a1a0b111bbcdf3be6bec35a98f1 (patch)
treef10195b6751a042211ddeb2e48f40aee986c3e22
parentb4486d20f01b5d1dbfdb79fa057bc1861384dab6 (diff)
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>
-rw-r--r--lib/private/User/Session.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 710cba84879..7aea219b608 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -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);