Page MenuHomePhabricator

Usernames containing spaces are incorrectly URL encoded when running with PHP 7.4
Closed, DuplicatePublic

Description

In PHP 7.4, I am unable to log in to my MediaWiki installation. Logging in initially works and sets a cookie but then outputs the log message "Session ... requested with mismatched UserID and UserName cookies.", redirects to a message to Log in again, and deletes the cookie.

My username contains a space. At line 128 of includes/session/CookieSessionProvider.php, $userName is 'Matt Raines' but $userInfo->getName() is 'Matt+Raines'.

Downgrading to PHP 7.3 fixes the problem.

Using MediaWiki 1.34.0