mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-18 09:48:12 +00:00
Show 'complexity password' error instead of a generic error
There is not discrimination between complexity and length errors because LDAP does not return different error codes for each case.
This commit is contained in:
1 parent
b7907d654d
commit
725dea5f6f
1 file changed
+9
-1
@@ -737,7 +737,15 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[self logWithFormat: @"%@", localException];
|
||||
if ([[localException name] isEqual: @"LDAPException"] &&
|
||||
([[[localException userInfo] objectForKey: @"error_code"] intValue] == LDAP_CONSTRAINT_VIOLATION))
|
||||
{
|
||||
*perr = PolicyInsufficientPasswordQuality;
|
||||
}
|
||||
else
|
||||
{
|
||||
[self logWithFormat: @"%@", localException];
|
||||
}
|
||||
}
|
||||
NS_ENDHANDLER ;
|
||||
|
||||
|
||||
Reference in new issue
Block a user