Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ private void checkAuthorizationFilters(List<SecurityFilterChain> chains) {
}
if (filterSecurityInterceptor != null) {
this.logger.warn(
"Usage of authorizeRequests is deprecated. Please use authorizeHttpRequests in the configuration");
"Usage of authorizeRequests is deprecated. Please use authorizeHttpRequests in the configuration. "
+ "If you are using XML configuration with <intercept-url>, "
+ "add use-authorization-manager=\"true\" to your <http> element.");
}
authorizationFilter = null;
filterSecurityInterceptor = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ public void validateCheckLoginPageAllowsAnonymous() {
+ "access to the configured login page. (Simulated access was rejected)");
}

@Test
void validateWhenOnlyFilterSecurityInterceptorThenWarnWithXmlGuidance() {
this.validator.validate(this.chain);
verify(this.logger).warn(
"Usage of authorizeRequests is deprecated. Please use authorizeHttpRequests in the configuration. "
+ "If you are using XML configuration with <intercept-url>, "
+ "add use-authorization-manager=\"true\" to your <http> element.");
}

// SEC-1957
@Test
public void validateCustomMetadataSource() {
Expand Down