mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 15:22:15 +00:00
Added check for use of "ref" with other attributes in <authentication-provider>.
This commit is contained in:
parent
ea5f2088b5
commit
a4fd191499
@ -57,6 +57,10 @@ public class AuthenticationManagerBeanDefinitionParser implements BeanDefinition
|
||||
if (node instanceof Element) {
|
||||
Element providerElt = (Element)node;
|
||||
if (StringUtils.hasText(providerElt.getAttribute(ATT_REF))) {
|
||||
if (providerElt.getAttributes().getLength() > 1) {
|
||||
pc.getReaderContext().error("authentication-provider element cannot be used with other attributes " +
|
||||
"when using 'ref' attribute", pc.extractSource(element));
|
||||
}
|
||||
NodeList providerChildren = providerElt.getChildNodes();
|
||||
for (int j = 0; j < providerChildren.getLength(); j++) {
|
||||
if (providerChildren.item(j) instanceof Element) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user