Skip to content

Commit

Permalink
consistent trim logic during evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-cat committed Aug 18, 2023
1 parent d332a93 commit 0a9eb13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configcatclient/rolloutevaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,11 @@ def _evaluate_comparison_rule_condition(self, comparison_rule, context, context_
return True, error
# IS ONE OF (hashed)
elif comparator == 16:
if sha256(user_value, salt, context_salt) in [x.strip() for x in comparison_value]:
if sha256(user_value, salt, context_salt) in comparison_value:
return True, error
# IS NOT ONE OF (hashed)
elif comparator == 17:
if sha256(user_value, salt, context_salt) not in [x.strip() for x in comparison_value]:
if sha256(user_value, salt, context_salt) not in comparison_value:
return True, error
# BEFORE, AFTER (UTC datetime)
elif 18 <= comparator <= 19:
Expand Down

0 comments on commit 0a9eb13

Please sign in to comment.