SEC-2908: mulitple invocations of http.requetMatchers() properly chains

This commit is contained in:
Rob Winch
2015-03-20 15:30:19 -05:00
parent b262c198d8
commit fbf3672eca
2 changed files with 87 additions and 1 deletions

View File

@@ -1313,9 +1313,11 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* @since 3.2
*/
public final class RequestMatcherConfigurer extends AbstractRequestMatcherRegistry<RequestMatcherConfigurer> {
private List<RequestMatcher> matchers = new ArrayList<RequestMatcher>();
protected RequestMatcherConfigurer chainRequestMatchers(List<RequestMatcher> requestMatchers) {
requestMatcher(new OrRequestMatcher(requestMatchers));
matchers.addAll(requestMatchers);
requestMatcher(new OrRequestMatcher(matchers));
return this;
}