diff --git a/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java
index fbb65be712..83e4fd08b1 100644
--- a/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java
+++ b/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java
@@ -316,7 +316,7 @@ public class HttpSecurityBeanDefinitionParserTests {
public void lowerCaseComparisonIsRespectedBySecurityFilterInvocationDefinitionSource() throws Exception {
setContext(
" " +
- " " +
+ " " +
" " +
" " + AUTH_PROVIDER_XML);
diff --git a/core/src/main/java/org/springframework/security/access/SecurityConfig.java b/core/src/main/java/org/springframework/security/access/SecurityConfig.java
index 7e7430ef4b..2254436f5a 100644
--- a/core/src/main/java/org/springframework/security/access/SecurityConfig.java
+++ b/core/src/main/java/org/springframework/security/access/SecurityConfig.java
@@ -75,7 +75,7 @@ public class SecurityConfig implements ConfigAttribute {
List attributes = new ArrayList(attributeNames.length);
for (String attribute : attributeNames) {
- attributes.add(new SecurityConfig(attribute));
+ attributes.add(new SecurityConfig(attribute.trim()));
}
return attributes;