]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
make local mutable copies for cargs / cparams in do_connect
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 1 Mar 2026 18:05:21 +0000 (13:05 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 2 Mar 2026 01:01:15 +0000 (20:01 -0500)
commitc11ba33518979e27926abc26cdbe9b177d391a16
tree04384cf4a6812b2ce2c1d749b615ab77b5e6008c
parent8046c6096362292151b44995f1282328ba087e4b
make local mutable copies for cargs / cparams in do_connect

Fixed a critical issue in :class:`.Engine` where connections created in
conjunction with the :meth:`.ConnectionEvents.do_connect` event listeners
would receive shared, mutable collections for the connection arguments,
leading to a variety of potential issues including unlimited growth of the
argument list as well as elements within the parameter dictionary being
shared among concurrent connection calls.  In particular this could impact
do_connect routines making use of complex mutable authentication
structures.

Fixes: #13144
Change-Id: I1549dae36e8e7e6cf50fdaf796659b53e7b78234
(cherry picked from commit dfb1c49cd7306eeca49fd7bb7ec4bcbef0e68d79)
doc/build/changelog/unreleased_20/13144.rst [new file with mode: 0644]
lib/sqlalchemy/engine/create.py
test/engine/test_execute.py