Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install passbolt if a ' is in the Mysql password. #303

Open
tuxis-ie opened this issue Feb 26, 2019 · 4 comments
Open

Unable to install passbolt if a ' is in the Mysql password. #303

tuxis-ie opened this issue Feb 26, 2019 · 4 comments
Labels

Comments

@tuxis-ie
Copy link

Installing passbolt with a ' in the Mysql password fails:

+ mysql -u root -e ';'
+ mysql -u root -e 'UPDATE mysql.user SET Password=PASSWORD('\''ABC'\''DEF'\'') WHERE User='\''root'\'';
DELETE FROM mysql.user WHERE User='\'''\'';
DELETE FROM mysql.user WHERE User='\''root'\'' AND Host NOT IN ('\''localhost'\'', '\''127.0.0.1'\'', '\''::1'\'');
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='\''test'\'' OR Db='\''test\_%'\'';
CREATE DATABASE IF NOT EXISTS passbolt;
GRANT ALL ON passbolt.* to passbolt@'\''localhost'\'' identified by '\''ABC.DEF'\'';
UPDATE mysql.user SET plugin = '\'''\'' WHERE user = '\''root'\'' AND host = '\''localhost'\'';
FLUSH PRIVILEGES;'
ERROR at line 1: Unknown command '\_'.

Seems like quoting goes wrong there.

@stripthis stripthis added the bug label Mar 4, 2019
@stripthis
Copy link
Member

Thank you for the bug report.

@maulwurf87
Copy link

maulwurf87 commented Apr 16, 2019

I just got an error when updating from Passbolt 2.1.0 to 2.8.3.
./bin/cake passbolt migrate --backup
fails when the password contains a $. I am not sure if this sticks to all special characters, as I cannot test it.

su -s /bin/bash -c "./bin/cake passbolt migrate --backup" nginx

Saving backup file: /var/www/passbolt/tmp/cache/database/backup_1555411772.sql
mysqldump: Got error: 1045: "Access denied for user 'passbolt'@'localhost' (using password: YES)" when trying to connect
Something went wrong!

Is this related to this bugreport or should I open a new one, as this happens on migration?

@cedricalfonsi
Copy link
Member

@maulwurf87 it's related to the database password but it's not the same issue.
You can create another ticket, we'll make the follow-up on it.

@JohnMcSpedon
Copy link

I had a similar problem thanks to e.g. $ or / in the database password. Maybe it has something to do with bash string escaping. It could be worth updating the tutorials to mention passwords should be alphanumeric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants