influxdb-python icon indicating copy to clipboard operation
influxdb-python copied to clipboard

Unquote username & password when parsing a DSN

Open dufferzafar opened this issue 3 years ago • 1 comments

A DSN like: influxdb://user:sec#ret@host:port should be written as influxdb://user:sec%23ret@host:port

RFC 3986 allows characters like # ? to appear %-quoted in username / password which should be properly unquoted before using them.

Please see relevant Python bug: https://bugs.python.org/issue18140#msg375109

dufferzafar avatar Jul 13 '22 08:07 dufferzafar

SQLAlchemy already handles this: https://github.com/sqlalchemy/sqlalchemy/blob/6e538cf64adfef7f604e3b0d976405a27b8e3d27/lib/sqlalchemy/engine/url.py#L834-L838

dufferzafar avatar Jul 13 '22 09:07 dufferzafar