BlackCatDevelopment / BlackCatCMS

BlackCat CMS is a PHP5, HTML5 content management system
https://blackcat-cms.org
Other
11 stars 9 forks source link

Problematic characters in DB Password #355

Closed creativecat closed 7 years ago

creativecat commented 8 years ago

In some cases installation will fail because of some special characters (e.g. ! ) in a database password. There might be a problem with parsing the .ini?

webbird commented 8 years ago

Testet on Windows, works for me...

creativecat commented 8 years ago

I could check in my database for those characters: /-_#*+!§,()=:.@äöüÄÖÜß

Problematic characters are: §äöüÄÖÜß Using those characters the installation process can not connect to the database.

Successfully tested characters during the installation are /-_#*+!,()=:.@

But after installation the parse_ini_file() throw an error: "Warning: syntax error, unexpected '(' in..." => This was caused again by the index.php as $file included the whole path but not only "index.php"... I gonna fix this.

According to the described problem I read on php.net those values are not allowed in a file: ?{}|&~!()^" Nevertheless /-_#*+!,()=:.@ is working fine in my installations also there is e.g. ) or ! in the password.

Should we allow to use any of the characters ?{}|&~!()^" or not?

webbird commented 7 years ago

So we have a problem caused by the fact I decided to store the DB credentials in an INI file? Could this issue be fixed by using a PHP (like config.php)?

creativecat commented 7 years ago

I'm going to test this....

webbird commented 7 years ago

For v1.x I added a note to our homepage.

https://blackcat-cms.org/page/download/bekannte-probleme.php

For v2.x we can try to find a solution.