Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Unsafe DB password will fail urlsplit in DatabaseURL #247

@librehat

Description

@librehat
url = 'postgres://username:[password@localhost:80/dbname'
DatabaseURL(url)  # an exception will be raised here from `urlsplit`

The root cause is the use of urllib.parse and the assumption that all components can be represented in the URL safe unquoted. As you can see, that is not always the case in real life (one of our servers has generated a password that has a [ but no ])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions