Bug #62925 | mysql_secure_installation script does not check user input | ||
---|---|---|---|
Submitted: | 25 Oct 2011 14:12 | Modified: | 20 Dec 2016 19:23 |
Reporter: | Rodolfo Ponteado | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.1.49-3, 5.5.18 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[25 Oct 2011 14:12]
Rodolfo Ponteado
[25 Oct 2011 18:51]
Valeriy Kravchuk
Our check of user input, even in 5.5.18, looks like this: # # Set the root password # echo "Setting the root password ensures that nobody can log into the MySQL" echo "root user without the proper authorisation." echo if [ $hadpass -eq 0 ]; then echo $echo_n "Set root password? [Y/n] $echo_c" else echo "You already have a root password set, so you can safely answer 'n'." echo echo $echo_n "Change the root password? [Y/n] $echo_c" fi read reply if [ "$reply" = "n" ]; then echo " ... skipping." else ... So, we check for 'n' as "no", and everything else is considered "yes". More strict check makes sense.
[26 Oct 2011 2:28]
Rodolfo Ponteado
Yes sir, i realized this since the beginning, perhaps i should have been more consice on the abstract topic saying that script does not check user input different than n.
[12 Jan 2014 17:41]
Daniƫl van Eeden
This bug is fixed in MySQL 5.7
[20 Dec 2016 19:23]
Paul DuBois
Posted by developer: Noted in 5.5.55, 5.6.36, 5.7.18, 8.0.1 changelogs. mysql_secure_installation is more strict about what it considers valid yes and no responses.
[16 Jan 2018 17:20]
Peng Alan
test