Uh oh!
There was an error while loading. Please reload this page.
Use RFC-compliant URL encoding for cookies - #25302
Conversation
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. Fixesnextcloud#24438 Signed-off-by: Marco Ziech <marco@ziech.net>
kesselb
commented
Jan 24, 2021
I was observing the same behavior on my instance, essentially all users with a space in the name have to login twice after the session expired. I tracked down the issue to a non-obvious change in PHP 7.4.2 and 7.4.3, which makes cookie encoding and decoding RFC compliant. See:
Basically PHP < 7.4.2 would encode Since NextCloud uses its own cookie encoding function, the PHP 7.4.3 encoding fix won't work. I fixed the issue by changing Originally posted by @mziech in #24438 (comment) |
rullzer
left a comment
There was a problem hiding this comment.
O that is a nasty little change.
Thanks for the detailed explanation.
ChristophWurst
left a comment
There was a problem hiding this comment.
👍 so HP can use his Nextcloud again
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
ChristophWurst
commented
Jan 29, 2021
/backport to stable20 |
ChristophWurst
commented
Jan 29, 2021
/backport to stable19 |
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