python-database-sanitizer icon indicating copy to clipboard operation
python-database-sanitizer copied to clipboard

Passwords with special characters

Open funkrusher opened this issue 3 years ago • 1 comments

would it be possible to provide the database-config as Environment-Variables to the database-sanitizer instead of an mysql:// url ?

Also, "mysqldumper" console command often also needs to be called in a specific way to accept passwords with special characers. In bash i often needed to call the mysqldump in way like this to work with special characters in passwords:

mysqldumper -p''"[password]"''

Passwords often/still have special characters (#, !, &, @, ...) and as soon as a password with such special characters is used the mysql:// url may not be able to be parsed anymore by urlparse python function in your code.

It would be great if the database-sanitizer would be able to accept all kind of passwords, also with any kind of special characters. Thx :)

funkrusher avatar Nov 28 '22 17:11 funkrusher

i have changed it by forking and accept parameters like follow (works then for all kind of passwords with all kind of special characters):

  python app.py -c ./config.yml --scheme mysql --hostname $HOST --username $USER --password ''"$PASS"'' --port $PORT --path /$BASE > dump.sql

i could create a pull request, but it seems the project is not active currently.

funkrusher avatar Nov 28 '22 21:11 funkrusher