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

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-03-13 13:11:13 +0300
committerJulius Härtl <jus@bitgrid.net>2019-03-15 12:00:01 +0300
commitc5bc80156e1850322c00ecde5e85e5e201b376ba (patch)
tree57598c08801a9540ba14cd1a379e792645791804 /lib
parente2e8565e7f5f2a8f3257e1bbef7b4d0bdd7dd203 (diff)
Fix guest name input
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/TokenManager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/TokenManager.php b/lib/TokenManager.php
index 9918aa30..f9689f64 100644
--- a/lib/TokenManager.php
+++ b/lib/TokenManager.php
@@ -141,8 +141,8 @@ class TokenManager {
}
$serverHost = $this->urlGenerator->getAbsoluteURL('/');//$this->request->getServerProtocol() . '://' . $this->request->getServerHost();
- if (is_null($this->userId) && isset($_COOKIE['guestUser'])) {
- $guest_name = $this->trans->t('Guest: %s', $_COOKIE['guestUser']);
+ if ($this->userId === null && isset($_COOKIE['guestUser'])) {
+ $guest_name = $this->trans->t('Guest: %s', \OC_Util::sanitizeHTML($_COOKIE['guestUser']));
} else {
$guest_name = NULL;
}