Skip to content

bug(nl-db): the MySQL path passes the URL's password still percent-encoded #20428

Closed

Description

@mrveiss

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.

Activity

  1. added
    bugSomething isn't working
    phase:M1.4Wizard and SLM: choose a mode, apply it, default models work
    on Nov 1, 2026
  2. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    Landed via the merge train (#20598, merge 87eae8acf8) via #20502

  3. added
    needs-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)
    on Nov 2, 2026
  4. mrveiss commented on Nov 2, 2026

    @mrveiss
    OwnerAuthor

    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.

    Delivered; the issue stays closed.

  5. removed
    needs-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't workingphase:M1.4Wizard and SLM: choose a mode, apply it, default models workpriority: low

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions