fix(pwd): fix 0 value for password policy

This commit is contained in:
Hivert Quentin committed 2026-10-09 11:08:40 +02:00
1 parent 6947441943
commit 981df7b2fc
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -54,6 +54,7 @@ Tests/node_modules
Tests/lib/config.js
Tests/results.xml
Tests/results
Tests/Unit/SoObjects
# SAML2 autogenerated files
SoObjects/SOGo/SOGoSAML2Exceptions.*
+1 -1
View File
@@ -75,7 +75,7 @@ static const NSString *SPECIAL_SYMBOL_ALLOWED = @"%$&*(){}!?\\@#.,:;+=\\[\\]\\|<
NSNumber *value = [policy objectForKey:@"value"];
NSInteger index = [[self policies] indexOfObject: label];
if (0 < value) {
if (0 < [value intValue]) {
NSMutableDictionary *newPolicy = [NSMutableDictionary dictionaryWithDictionary: policy];
[newPolicy setObject:[[self regexPoliciesWithCount: value] objectAtIndex: index] forKey:@"regex"];
[passwordPolicy addObject: newPolicy];