Bug #49848 | space prefixed or trailed passwords not recognized by mysql_secure_installation | ||
---|---|---|---|
Submitted: | 21 Dec 2009 14:12 | Modified: | 9 Dec 2016 9:43 |
Reporter: | Liselore Vermeulen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S3 (Non-critical) |
Version: | 5.1.39-ndb-7.0.9-cluster | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution, mysql_secure_installation password limits |
[21 Dec 2009 14:12]
Liselore Vermeulen
[21 Dec 2009 14:14]
Liselore Vermeulen
further down the code, the line rootpass=$password; should be changed to rootpass="${password}"; to cover this space-enabled password. This specific line could also break if the password had a space in the middle.
[21 Dec 2009 14:15]
Liselore Vermeulen
and the lines in set_root_password() function: read password1 and read password2 would have to be changed to read -s && password1="${REPLY}"; respectively read -s && password2="${REPLY}";
[21 Dec 2009 16:27]
Liselore Vermeulen
I discover: the solution proposed, only works with bash. The posix norm does not specify what read without arguments should perform. * or create another way to read the password (not using read) (like a small executable); * or warn the user (when asking for the password) about this limitation (not accepting spaces in password); * or enforce the use of bash (instead of /bin/sh).
[23 Dec 2009 10:03]
Sveta Smirnova
Thank you for the report. This can be fixed by fix for bug #4803. Could you please try this script from upcoming 5.1.42: it should work with cluster binaries as well. You can also try snapshots from http://labs.mysql.com/index.php
[24 Jan 2010 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[9 Dec 2016 9:40]
Terje Røsten
Posted by developer: Fixed by: commit 2fb9344d2ab546402705e8d7203616d7487f5e35 Author: Vamsikrishna Bhagi <vamsikrishna.bhagi@oracle.com> Date: Tue Aug 13 21:47:28 2013 +0530 WL#6441 Convert mysql_secure_installation script to C