Fix for SEC-225. Allow empty search base in authorities populator.
This commit is contained in:
parent
48716af20a
commit
3f06c51379
|
@ -161,9 +161,14 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
|
||||||
*/
|
*/
|
||||||
public DefaultLdapAuthoritiesPopulator(InitialDirContextFactory initialDirContextFactory, String groupSearchBase) {
|
public DefaultLdapAuthoritiesPopulator(InitialDirContextFactory initialDirContextFactory, String groupSearchBase) {
|
||||||
Assert.notNull(initialDirContextFactory, "InitialDirContextFactory must not be null");
|
Assert.notNull(initialDirContextFactory, "InitialDirContextFactory must not be null");
|
||||||
Assert.hasLength(groupSearchBase, "The groupSearchBase (name to search under), must be specified.");
|
Assert.notNull(groupSearchBase, "The groupSearchBase (name to search under), must not be null.");
|
||||||
this.initialDirContextFactory = initialDirContextFactory;
|
this.initialDirContextFactory = initialDirContextFactory;
|
||||||
this.groupSearchBase = groupSearchBase;
|
this.groupSearchBase = groupSearchBase;
|
||||||
|
|
||||||
|
if(groupSearchBase.length() == 0) {
|
||||||
|
logger.info("groupSearchBase is empty. Searches will be performed from the root: " +
|
||||||
|
initialDirContextFactory.getRootDn());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//~ Methods ================================================================
|
//~ Methods ================================================================
|
||||||
|
|
Loading…
Reference in New Issue