Bug #81958 Password dialog not robust with special characters
Submitted: 21 Jun 2016 18:56 Modified: 23 Aug 2017 11:40
Reporter: Braxton Lay Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:5.7.12 OS:Ubuntu (16.04 LTS)
Assigned to: Lars Tangvald CPU Architecture:Any

[21 Jun 2016 18:56] Braxton Lay
Description:
MySQL will not install when specifying a root password that contains a ' (apostrophe) character. For example, running sudo apt-get install mysql-server results in it being downloaded and what not, then when it asks for the root password in the pink screen, specifying a password such as what's or adm'n results in the installation to hang at:  update-alternatives: using /etc/mysql/mysql.vnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode

How to repeat:

sudo apt-get install mysql-server

at the prompt for the mysql root password, type: adm'n   (or any password with an ' (apostrophe) in it)
[23 Jun 2016 6:07] Chiranjeevi Battula
Hello Braxton Lay,

Thank you for the bug report.
Verified as described on Ubuntu 16.04 LTS.

Thanks,
Chiranjeevi.
[23 Jun 2016 7:23] Chiranjeevi Battula
Hello Braxton Lay,

Thank you for the bug report.
I tried to reproduce the issue at my end using MySQL on  Ubuntu 16.04 LTS but not seeing any hanging.
Please follow the steps to install MySQL
http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Thanks,
Chiranjeevi.
[23 Jun 2016 7:55] Lars Tangvald
Posted by developer:
 
The current upstream version (5.7.13) won't hang, but the installation will still throw an error, so the issue is there.

We should be able to escape the password string using printf %q in the postinst script.
This will escape more symbols than necessary, e.g. $, but MySQL will interpret "\$" and "$" the same, so shouldn't be a problem (need to test this thoroughly).
[24 Jul 2016 1: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".
[1 Aug 2016 6:32] Lars Tangvald
Forgot to update this when the cause was identified :)
[23 Aug 2017 11:40] Yngve Svendsen
This was fixed in version 5.7.16,