Page MenuHomePhabricator

Cannot install mediawiki when database admin user password ends with spaces
Closed, ResolvedPublic

Description

Author: luizluca

Description:
Hello,

Mediawiki fails to install when my mysql root password is something like "12345678 " (sequence of 1 to 8 and two spaces). It might be some trim over the password input.

If I change the password to something without spaces, it just works.

Please, remove this restriction.


Version: 1.22.0
Severity: normal

Details

Reference
bz30524

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:51 PM
bzimport added a project: MediaWiki-Installer.
bzimport set Reference to bz30524.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Aug 23 2011, 1:19 AM
brion added a comment.Aug 23 2011, 5:38 PM

Looks like there's a trim() in WebInstaller::setVarsFromRequest which is the likely culprit.

It does have some special handling for fields with 'password' in the name (I think to obfuscate them in the session data?), so perhaps we could move the trim() down to the non-password handling.

Brian:
This report has been in ASSIGNED status for more than one year and you are set as its assignee. In case that you are not actively working on a fix, please reset the bug status to NEW/UNCONFIRMED.
In case you do not plan to work on a fix in the near future: Please also edit the "Assigned To" field by clicking "Reset Assignee to default", in order to not prevent potential contributors from working on a fix. Thanks for your help!
[assigned>=1y]

Brion:
This report has been in ASSIGNED status for more than one year and you are set as its assignee. In case that you are not actively working on a fix, please reset the bug status to NEW/UNCONFIRMED.
In case you do not plan to work on a fix in the near future: Please also edit the "Assigned To" field by clicking "Reset Assignee to default", in order to not prevent potential contributors from working on a fix. Thanks for your help!
[assigned>=1y]

In the mysql shell, run

SET PASSWORD for 'user'@'localhost' = PASSWORD('whatever ');

Entering that in the installer, it says
"DB connection error: Access denied"
Scrolling down, the "Database password" is one char shorter (my last char was a whitespace).

After running

SET PASSWORD for 'user'@'locahost' = PASSWORD('whatever');

the installer works.

So this is still an issue in 1.22 git master of today.

Change 145859 had a related patch set uploaded by Taueres:
WebInstaller::setVarsFromRequest() do not trim passwords

https://gerrit.wikimedia.org/r/145859

Change 145859 merged by jenkins-bot:
WebInstaller::setVarsFromRequest() do not trim passwords

https://gerrit.wikimedia.org/r/145859