You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(nl-db): the MySQL path passes the URL's password still percent-encoded #20428
Found while fixing #19812. autobot-backend/services/nl_database_service.py:205 and :677 read the MySQL connection URL with urlparse and pass parsed.password to aiomysql.connect without decoding it. urlparse does not decode, so a password that is correctly percent-encoded in the URL reaches the server still encoded and the login fails. A raw one containing @, : or / breaks the parse instead.
The user and password reach aiomysql.connect decoded, at both sites (test with an encoded @:/% password).
Whether anyone runs this path against a password with such characters is not measured.
Verified against origin/main after the merge train (PR #20598) landed (#20502 is a member).
AC
Evidence
User and password reach aiomysql.connect decoded at both sites
autobot-backend/services/nl_database_service.py:176-185_mysql_connect_args applies unquote to user and password; both connect sites (:217, :681) call aiomysql.connect(**_mysql_connect_args(db_url)). Test nl_database_mysql_url_20428_test.py:10 decodes a%40%3A%2F%25b to a@:/%b.
Activity
github-actions commentedon Nov 2, 2026
Landed via the merge train (#20598, merge
87eae8acf8) via #20502mrveiss commentedon Nov 2, 2026
Verified against
origin/mainafter the merge train (PR #20598) landed (#20502 is a member).aiomysql.connectdecoded at both sitesautobot-backend/services/nl_database_service.py:176-185_mysql_connect_argsappliesunquoteto user and password; both connect sites (:217,:681) callaiomysql.connect(**_mysql_connect_args(db_url)). Testnl_database_mysql_url_20428_test.py:10decodesa%40%3A%2F%25btoa@:/%b.Delivered; the issue stays closed.