pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
194 stars 81 forks source link

Bad finding comment characters in the line #264

Open dextromethorphanum opened 3 years ago

dextromethorphanum commented 3 years ago

Hi. I have a problem when using function mysql_connect_file and file where i store data to connect to database. The contents of this file:

hostname = localhost
username = root
database = some_database
password = hz@WTNFHIxI7~{VAMx3*}raAs8#~DFbE

The plugin searches the file for symbols '#' or ';' in any position of the line, but according to the INI-file parsing rules (https://en.wikipedia.org/wiki/INI_file#Comments), a comment is a line in which the comment character is at the beginning of the line. Due to this plugin error, it is impossible to use the mysql_connect_file function if the password contains one of these special characters ('#' or ';'), and I am forced to use mysql_connect.