Show 'complexity password' error instead of a generic error.

There is not discrimination between complexity and length errors because backend does not
return different error codes for each case.
This commit is contained in:
Javier Amor García committed 2015-05-19 15:00:18 +02:00
1 parent b7907d654d
commit 5a8f310bc8
1 file changed
+7
+7
View File
@@ -736,9 +736,16 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
} }
} }
NS_HANDLER NS_HANDLER
{
if ([[localException name] isEqual: @"LDAPException"] && ([[[localException userInfo] objectForKey: @"error_code"] intValue] == LDAP_CONSTRAINT_VIOLATION))
{
*perr = PolicyInsufficientPasswordQuality;
}
else
{ {
[self logWithFormat: @"%@", localException]; [self logWithFormat: @"%@", localException];
} }
}
NS_ENDHANDLER ; NS_ENDHANDLER ;
[bindConnection release]; [bindConnection release];