Skip to content

Commit bfd36d9

Browse files
committed
Remove Redundant ConcurrentSessionFilter Refs
Fixes gh-8105
1 parent 7411f25 commit bfd36d9

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/HttpSecurityBuilder.java

+1-3
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-2020 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.
@@ -136,14 +136,12 @@ <C extends SecurityConfigurer<DefaultSecurityFilterChain, H>> C removeConfigurer
136136
*
137137
* <ul>
138138
* <li>{@link ChannelProcessingFilter}</li>
139-
* <li>{@link ConcurrentSessionFilter}</li>
140139
* <li>{@link SecurityContextPersistenceFilter}</li>
141140
* <li>{@link LogoutFilter}</li>
142141
* <li>{@link X509AuthenticationFilter}</li>
143142
* <li>{@link AbstractPreAuthenticatedProcessingFilter}</li>
144143
* <li><a href="{@docRoot}/org/springframework/security/cas/web/CasAuthenticationFilter.html">CasAuthenticationFilter</a></li>
145144
* <li>{@link UsernamePasswordAuthenticationFilter}</li>
146-
* <li>{@link ConcurrentSessionFilter}</li>
147145
* <li>{@link OpenIDAuthenticationFilter}</li>
148146
* <li>{@link org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter}</li>
149147
* <li>{@link org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter}</li>

config/src/main/java/org/springframework/security/config/annotation/web/builders/FilterComparator.java

+3-3
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-2020 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.
@@ -63,7 +63,7 @@ final class FilterComparator implements Comparator<Filter>, Serializable {
6363
FilterComparator() {
6464
Step order = new Step(INITIAL_ORDER, ORDER_STEP);
6565
put(ChannelProcessingFilter.class, order.next());
66-
put(ConcurrentSessionFilter.class, order.next());
66+
order.next(); // gh-8105
6767
put(WebAsyncManagerIntegrationFilter.class, order.next());
6868
put(SecurityContextPersistenceFilter.class, order.next());
6969
put(HeaderWriterFilter.class, order.next());
@@ -87,7 +87,7 @@ final class FilterComparator implements Comparator<Filter>, Serializable {
8787
"org.springframework.security.saml2.provider.service.servlet.filter.Saml2WebSsoAuthenticationFilter",
8888
order.next());
8989
put(UsernamePasswordAuthenticationFilter.class, order.next());
90-
put(ConcurrentSessionFilter.class, order.next());
90+
order.next(); // gh-8105
9191
filterToOrder.put(
9292
"org.springframework.security.openid.OpenIDAuthenticationFilter", order.next());
9393
put(DefaultLoginPageGeneratingFilter.class, order.next());

docs/manual/src/docs/asciidoc/_includes/servlet/architecture/security-filters.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ However, there are times that it is beneficial to know the ordering
99
Below is a comprehensive list of Spring Security Filter ordering:
1010

1111
* ChannelProcessingFilter
12-
* ConcurrentSessionFilter
1312
* WebAsyncManagerIntegrationFilter
1413
* SecurityContextPersistenceFilter
1514
* HeaderWriterFilter
@@ -24,10 +23,10 @@ Below is a comprehensive list of Spring Security Filter ordering:
2423
* OAuth2LoginAuthenticationFilter
2524
* Saml2WebSsoAuthenticationFilter
2625
* <<servlet-authentication-usernamepasswordauthenticationfilter,`UsernamePasswordAuthenticationFilter`>>
27-
* ConcurrentSessionFilter
2826
* OpenIDAuthenticationFilter
2927
* DefaultLoginPageGeneratingFilter
3028
* DefaultLogoutPageGeneratingFilter
29+
* ConcurrentSessionFilter
3130
* <<servlet-authentication-digest,`DigestAuthenticationFilter`>>
3231
* BearerTokenAuthenticationFilter
3332
* <<servlet-authentication-basic,`BasicAuthenticationFilter`>>

0 commit comments

Comments
 (0)