Skip to content

Commit 063f06e

Browse files
Register FilterChainProxy for all dispatcher types
Closes gh-12180
1 parent 7929d7b commit 063f06e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docs/modules/ROOT/pages/whats-new.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Use the OpenSaml 4 Support instead.
4747
** Remove `Saml2AuthenticationToken(String, String, String, String, List)`
4848
** Remove `RelyingPartyRegistration.ProviderDetails` and related methods
4949
** Remove `OpenSamlAuthenticationProvider`
50+
* https://github.com/spring-projects/spring-security/issues/12180[gh-12180] - Register `FilterChainProxy` for all dispatcher types
5051

5152
== Core
5253

web/src/main/java/org/springframework/security/web/context/AbstractSecurityWebApplicationInitializer.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -280,7 +280,8 @@ protected void afterSpringSecurityFilterChain(ServletContext servletContext) {
280280
* @return
281281
*/
282282
protected EnumSet<DispatcherType> getSecurityDispatcherTypes() {
283-
return EnumSet.of(DispatcherType.REQUEST, DispatcherType.ERROR, DispatcherType.ASYNC);
283+
return EnumSet.of(DispatcherType.REQUEST, DispatcherType.ERROR, DispatcherType.ASYNC, DispatcherType.FORWARD,
284+
DispatcherType.INCLUDE);
284285
}
285286

286287
/**

web/src/test/java/org/springframework/security/web/context/AbstractSecurityWebApplicationInitializerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@
5454
public class AbstractSecurityWebApplicationInitializerTests {
5555

5656
private static final EnumSet<DispatcherType> DEFAULT_DISPATCH = EnumSet.of(DispatcherType.REQUEST,
57-
DispatcherType.ERROR, DispatcherType.ASYNC);
57+
DispatcherType.ERROR, DispatcherType.ASYNC, DispatcherType.FORWARD, DispatcherType.INCLUDE);
5858

5959
@Test
6060
public void onStartupWhenDefaultContextThenRegistersSpringSecurityFilterChain() {

0 commit comments

Comments
 (0)