saml icon indicating copy to clipboard operation
saml copied to clipboard

fix(HandleIDPInitiated): Remove recursive rlock

Open dmoerner opened this issue 6 months ago • 0 comments

There is a recursive RLock in the path HandleIDPInitiated -> ServeIDPInitiated -> GetServiceProvider. This can lead to deadlocks under concurrent requests. The outer RLock is unnecessary, because GetServiceProvider is the only call to access the protected serviceProviders map, and it already guards access with RLock.

For further context from a similar issue, see: https://github.com/clerk/saml/commit/91716e8856a3a1723129577d6dfb5352d06fc837

A similar fix for a different recursive rlock was already merged into upstream here: https://github.com/crewjam/saml/pull/553

dmoerner avatar Aug 06 '25 14:08 dmoerner