Use RFC-compliant URL encoding for cookies

PHP 7.4.2 changed the way how cookies are decoded, applying RFC-compliant raw URL decoding. This leads to a conflict Nextcloud's own cookie encoding, breaking the remember-me function if the UID contains a space character.

Fixes #24438

Signed-off-by: Marco Ziech <marco@ziech.net>
This commit is contained in:
Marco Ziech 2021-01-24 14:18:28 +01:00 committed by backportbot[bot]
parent 255bbcb0df
commit c5d2ea84e6
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class CookieHelper {
$header = sprintf( $header = sprintf(
'Set-Cookie: %s=%s', 'Set-Cookie: %s=%s',
$name, $name,
urlencode($value) rawurlencode($value)
); );
if ($path !== '') { if ($path !== '') {