SEC-1210: RememberMe filter misses UserDetailsService in default <http /> tag config when it is declared in parent app context. Fixed by getting the UserDetailsServiceInjectionPostProcessor to check ancestor bean factories for a UserDetailsService if one isn't found in the current bean factory.
This commit is contained in:
@@ -938,6 +938,16 @@ public class HttpSecurityBeanDefinitionParserTests {
|
||||
assertEquals(Boolean.TRUE, FieldUtils.getFieldValue(filter, "repo.disableUrlRewriting"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void userDetailsServiceInParentContextIsLocatedSuccessfully() throws Exception {
|
||||
appContext = new InMemoryXmlApplicationContext(AUTH_PROVIDER_XML);
|
||||
|
||||
appContext = new InMemoryXmlApplicationContext(
|
||||
"<http auto-config='true'>" +
|
||||
" <remember-me />" +
|
||||
"</http>", appContext);
|
||||
}
|
||||
|
||||
private void setContext(String context) {
|
||||
appContext = new InMemoryXmlApplicationContext(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user