SEC-950: Added test to attempt to reproduce problem.
This commit is contained in:
parent
8b376ccdeb
commit
3a9eb018ba
|
@ -56,6 +56,17 @@ public class FilterBasedLdapUserSearchTests extends AbstractLdapIntegrationTests
|
||||||
assertEquals(new DistinguishedName("uid=bob,ou=people"), bob.getDn());
|
assertEquals(new DistinguishedName("uid=bob,ou=people"), bob.getDn());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void searchForNameWithCommaSucceeds() {
|
||||||
|
FilterBasedLdapUserSearch locator = new FilterBasedLdapUserSearch("ou=people", "(uid={0})", dirCtxFactory);
|
||||||
|
locator.setSearchSubtree(false);
|
||||||
|
|
||||||
|
DirContextOperations jerry = locator.searchForUser("jerry");
|
||||||
|
assertEquals("jerry", jerry.getStringAttribute("uid"));
|
||||||
|
|
||||||
|
assertEquals(new DistinguishedName("cn=mouse\\, jerry,ou=people"), jerry.getDn());
|
||||||
|
}
|
||||||
|
|
||||||
// Try some funny business with filters.
|
// Try some funny business with filters.
|
||||||
@Test
|
@Test
|
||||||
public void extraFilterPartToExcludeBob() throws Exception {
|
public void extraFilterPartToExcludeBob() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue