mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-27 14:22:47 +00:00
SEC-650: Change default scope to sub-tree.
This commit is contained in:
parent
e6d6e88117
commit
80b6111641
@ -85,6 +85,8 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
|
|||||||
this.contextSource = contextSource;
|
this.contextSource = contextSource;
|
||||||
this.searchBase = searchBase;
|
this.searchBase = searchBase;
|
||||||
|
|
||||||
|
setSearchSubtree(true);
|
||||||
|
|
||||||
if (searchBase.length() == 0) {
|
if (searchBase.length() == 0) {
|
||||||
logger.info("SearchBase not set. Searches will be performed from the root: "
|
logger.info("SearchBase not set. Searches will be performed from the root: "
|
||||||
+ contextSource.getBaseLdapPath());
|
+ contextSource.getBaseLdapPath());
|
||||||
@ -161,7 +163,7 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
|
|||||||
sb.append(", scope: ")
|
sb.append(", scope: ")
|
||||||
.append(searchControls.getSearchScope() == SearchControls.SUBTREE_SCOPE ? "subtree" : "single-level, ");
|
.append(searchControls.getSearchScope() == SearchControls.SUBTREE_SCOPE ? "subtree" : "single-level, ");
|
||||||
sb.append("searchTimeLimit: ").append(searchControls.getTimeLimit());
|
sb.append("searchTimeLimit: ").append(searchControls.getTimeLimit());
|
||||||
sb.append("derefLinkFlag: ").append(searchControls.getDerefLinkFlag()).append(" ]");
|
sb.append(", derefLinkFlag: ").append(searchControls.getDerefLinkFlag()).append(" ]");
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user