result3 does not invoke message.clean() when an exception is thrown
by `message.connection.result3()` call, causing pool connection
associated with the message to be marked active forever. This causes
a denial-of-service on ldappool.
The fix ensures message.clean() is invoked by wrapping the offending
call in try-except-finally and putting the message.clean() in finally
block.
Closes-Bug: #1998789
Change-Id: I59ebf0fa77391d49b2349e918fc55f96318c42a6
Signed-off-by: Mustafa Kemal Gilor <email address hidden>
(cherry picked from commit ff632a81fb09e6d9f3298e494d53eb6df50269cf)
Reviewed: https:/ /review. opendev. org/c/openstack /keystone/ +/874841 /opendev. org/openstack/ keystone/ commit/ 7c30c9e000b5805 5b61d8cf58e5249 3f2b5aba8a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit 7c30c9e000b5805 5b61d8cf58e5249 3f2b5aba8a
Author: Mustafa Kemal Gilor <email address hidden>
Date: Mon Dec 5 17:33:47 2022 +0300
[PooledLDAP Handler] Ensure result3() invokes message.clean()
result3 does not invoke message.clean() when an exception is thrown connection. result3( )` call, causing pool connection
by `message.
associated with the message to be marked active forever. This causes
a denial-of-service on ldappool.
The fix ensures message.clean() is invoked by wrapping the offending
call in try-except-finally and putting the message.clean() in finally
block.
Closes-Bug: #1998789
Change-Id: I59ebf0fa77391d 49b2349e918fc55 f96318c42a6 9f3298e494d53eb 6df50269cf)
Signed-off-by: Mustafa Kemal Gilor <email address hidden>
(cherry picked from commit ff632a81fb09e6d