From e0b6e22fa278d3d908b17acbe5f5c284d3563773 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 5 May 2021 09:48:17 -0400 Subject: [PATCH] fix(core): don't bind a DN to LDAP sources with a different search base --- SoObjects/SOGo/LDAPSource.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoObjects/SOGo/LDAPSource.m b/SoObjects/SOGo/LDAPSource.m index 7902b636d..d150f9a36 100644 --- a/SoObjects/SOGo/LDAPSource.m +++ b/SoObjects/SOGo/LDAPSource.m @@ -586,7 +586,7 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses _IDField, [_login escapedForLDAPDN], _baseDN]; } - if (userDN) + if (userDN && [[userDN lowercaseString] hasSuffix: [_baseDN lowercaseString]]) { if (!_passwordPolicy) didBind = [bindConnection bindWithMethod: @"simple"