Skip to content

Commit

Permalink
fix(preferences): regex in Sieve scripts are now case sensitive
Browse files Browse the repository at this point in the history
Fixes #5561
  • Loading branch information
cgx committed Jul 22, 2022
1 parent 407bc53 commit adfd175
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SoObjects/SOGo/SOGoSieveManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ + (void) initialize
if (!sieveOperators)
{
sieveOperators = [NSArray arrayWithObjects: @"is", @"contains",
@"matches", @"regex",
@"matches", @"regex", @"regex :comparator \"i;octet\"",
@"over", @"under", nil];
[sieveOperators retain];
}
Expand Down Expand Up @@ -367,6 +367,8 @@ - (BOOL) _extractRuleOperator: (NSString **) operator
requirement = [operatorRequirements objectForKey: baseOperator];
if (requirement)
[requirements addObjectUniquely: requirement];
if ([baseOperator isEqualToString: @"regex"])
baseOperator = @"regex :comparator \"i;octet\""; // case-sensitive comparator
*operator = baseOperator;
}
else
Expand Down

0 comments on commit adfd175

Please sign in to comment.