osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
213 stars 127 forks source link

Ensure that provided MySQL and Redis passwords are URL-Safe #664

Closed def750 closed 4 months ago

def750 commented 4 months ago

Describe your changes

Added urlib parse to redis and MySQL passwords, to ensure that passwords are URL-Safe without need to escape special characters

Related Issues / Projects

Checklist

cmyui commented 4 months ago

thanks for the fix!

hmm, i see at the moment we just construct the dsn's inline in settings now: https://github.com/def750/gaug/blob/a6403bfb3a772feeb5290ac9a90278878e575029/app/settings.py#L22

we should probably have create_dsn() functions for redis & mysql, with quoting implemented there, such that more code could benefit from this