mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-08 13:12:12 +00:00
Previously DelegatingSecurityContextRunnable and DelegatingSecurityContextCallable would not setup the SecurityContext if it was on the same thread as it was created. This was intended to fix SEC-3031 but simply caused more problems. This commit changes the strategy to keep track of the previous SecurityContext and restore it (or clear it out if it was originally empty).