mysql password html encoded causing problems with special chars like & #690

Closed
anonymous-piwik-user opened this Issue May 4, 2009 · 2 comments

2 participants

@anonymous-piwik-user

hi,

We checked that this bug is not a duplicate of #462 (although it contains the same sql error).

After the installation of piwik on our server, I was unable to login, getting this error :

SQLSTATE[28000] [1045] Access denied for user 'xxx'@'localhost' (using password: YES)
Backtrace:

#0 /xxx/www/piwik/libs/Zend/Db/Adapter/Abstract.php(228): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /xxx/www/piwik/core/Piwik.php(1180): Zend_Db_Adapter_Abstract->getConnection()
#2 /xxx/www/piwik/core/FrontController.php(230): Piwik::createDatabaseObject()
#3 /xxx/www/piwik/index.php(48): Piwik_FrontController->init()
#4 {main}

then my admin was able to correct the error in piwik/config/config.ini.php : he found out that the password i use (in mysql database), which contains the char ampersand (&) was apparently twice encoded causing it to be stored as & instead of simply &

once the password was corrected, login was possible and everything seems to work properly.

another strange thing about passwords occured while choosing the piwik super user password : piwik rejected all passwords containing special characters saying they didn't match although they did for sure (as a lazy person, i copied/pasted them in the both fields). tried several times and it worked only when i gave in a password without special characters. we did not retried many times to check which ones did work, which once didn't etc. but we think it might be related to the same bug as the first mentionned here and so we don't think it's worth opening another new ticket.

bye & thanks for providing a nice open source website traffic analyzer !
Keywords: mysql password html ampersand

@mattab
Piwik Open Source Analytics member

from email

Example I use a combination of $^"& in my database passwords and the character " is not written correctly in the config.ini.php file.

Strong passwords with non alpha-numeric characters is encouraged generally and this should be noted as a potential problem.

@mattab
Piwik Open Source Analytics member

(In [1165]) - fix #690 mysql password html encoded causing problems with special chars like &

  • now encoding stuff properly + added tests
@anonymous-piwik-user anonymous-piwik-user added this to the Piwik 0.4 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment