SEC-1380: Trim whitespace from config attributes when building a list in SecurityConfig.

This commit is contained in:
Luke Taylor 2010-01-22 23:05:12 +00:00
parent 04447bdbf0
commit d931495c8a
2 changed files with 2 additions and 2 deletions

View File

@ -316,7 +316,7 @@ public class HttpSecurityBeanDefinitionParserTests {
public void lowerCaseComparisonIsRespectedBySecurityFilterInvocationDefinitionSource() throws Exception {
setContext(
" <http auto-config='true' path-type='ant' lowercase-comparisons='false'>" +
" <intercept-url pattern='/Secure*' access='ROLE_A,ROLE_B' />" +
" <intercept-url pattern='/Secure*' access='ROLE_A, ROLE_B' />" +
" <intercept-url pattern='/**' access='ROLE_C' />" +
" </http>" + AUTH_PROVIDER_XML);

View File

@ -75,7 +75,7 @@ public class SecurityConfig implements ConfigAttribute {
List<ConfigAttribute> attributes = new ArrayList<ConfigAttribute>(attributeNames.length);
for (String attribute : attributeNames) {
attributes.add(new SecurityConfig(attribute));
attributes.add(new SecurityConfig(attribute.trim()));
}
return attributes;