]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
match on single host/port only for integer port
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Jul 2023 14:06:14 +0000 (10:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Jul 2023 14:25:53 +0000 (10:25 -0400)
commita2c06a2a0acf769060f11bb34c1b55cecae5f5fe
tree1dfafcbe942e63f16a7f34c2d5d38be36a7102fb
parentffd6d56db761bb396e2c9b1773ce2a973ed8415e
match on single host/port only for integer port

Fixed regression caused by improvements to PostgreSQL URL parsing in
:ticket:`10004` where "host" query string arguments that had colons in
them, to support various third party proxy servers and/or dialects, would
not parse correctly as these were evaluted as ``host:port`` combinations.
Parsing has been updated to consider a colon as indicating a ``host:port``
value only if the hostname contains only alphanumeric characters with dots
or dashes only (e.g. no slashes), followed by exactly one colon followed by
an all-integer token of zero or more integers.  In all other cases, the
full string is taken as a host.

Fixes: #10069
Change-Id: I77beb27e44abc0a66aa0810de855daa4186dacfd
doc/build/changelog/unreleased_20/10069.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
test/dialect/postgresql/test_dialect.py