SEC-1201: PropertyPlaceholderConfigurer does not work for intercept-url attributes. Ensure that channel processing handles paths which are placeholders.

This commit is contained in:
Luke Taylor
2009-08-23 15:57:59 +00:00
parent 9bf8656d66
commit ea01e9cdf7
2 changed files with 17 additions and 14 deletions

View File

@@ -390,11 +390,13 @@ public class HttpSecurityBeanDefinitionParserTests {
@Test
public void requiresChannelSupportsPlaceholder() throws Exception {
System.setProperty("secure.url", "/secure");
setContext(
" <b:bean id='configurer' class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'/>" +
" <http auto-config='true'>" +
" <intercept-url pattern='/**' requires-channel='https' />" +
" <intercept-url pattern='${secure.url}' requires-channel='https' />" +
" </http>" + AUTH_PROVIDER_XML);
List<Filter> filters = getFilters("/someurl");
List<Filter> filters = getFilters("/secure");
assertEquals("Expected " + (AUTO_CONFIG_FILTERS + 1) +" filters in chain", AUTO_CONFIG_FILTERS + 1, filters.size());