SEC-1679: Make sure whitespace is trimmed from cookie names when specifying multiple cookies.

This commit is contained in:
Luke Taylor 2011-02-14 19:02:28 +00:00
parent 27be72a81c
commit bc2448419b
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class LogoutBeanDefinitionParser implements BeanDefinitionParser {
if (StringUtils.hasText(deleteCookies)) {
BeanDefinition cookieDeleter = new RootBeanDefinition(CookieClearingLogoutHandler.class);
String[] names = StringUtils.commaDelimitedListToStringArray(deleteCookies);
String[] names = StringUtils.tokenizeToStringArray(deleteCookies, ",");
cookieDeleter.getConstructorArgumentValues().addGenericArgumentValue(names);
handlers.add(cookieDeleter);
}

View File

@ -355,8 +355,8 @@ class MiscHttpConfigTests extends AbstractHttpConfigTests {
expect:
handlers[1] instanceof CookieClearingLogoutHandler
handlers[1].cookiesToClear[0] = 'JSESSIONID'
handlers[1].cookiesToClear[1] = 'mycookie'
handlers[1].cookiesToClear[0] == 'JSESSIONID'
handlers[1].cookiesToClear[1] == 'mycookie'
}
def invalidLogoutUrlIsDetected() {