]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
fix backtracking hang in hstore literal parser
authordxbjavid <dxbjavid@gmail.com>
Fri, 12 Jun 2026 11:19:04 +0000 (07:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 15 Jun 2026 13:26:32 +0000 (09:26 -0400)
commit83f2a4f95115390a707f04b257f116497f7d427c
treeff3575ad54e04b53bda0d9346969be68fe2f7627
parentfed218967421fb25ecd93cb24ee894cc1f3852f3
fix backtracking hang in hstore literal parser

Fixed regular expression in the pure Python hstore result processor,
used when ``use_native_hstore=False`` is set, which could hang on
malformed hstore text containing unterminated quoted segments with
backslashes.  Pull request courtesy dxbjavid.

Fixes: #13370
Closes: #13371
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13371
Pull-request-sha: f5eddae11c435c78f326b70a15357cbaf6d09337

Change-Id: I0d2d7565dc88f56a73b41e2ad20ca1c5a6f738bb
(cherry picked from commit 0c38dfff3025176324996970dfb0c0f3e05ff28d)
doc/build/changelog/unreleased_20/13370.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/hstore.py
test/dialect/postgresql/test_types.py