mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-02-23 15:20:19 +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).