Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
CVE-2020-15070: Replace eval with ast.literal_eval.
Anders Kaseorg47913fb09179
diff --git a/zerver/models.py b/zerver/models.pyindex 3f6cb641931..ec4e8bf056b 100644--- a/zerver/models.py+++ b/zerver/models.py@@ -1,3 +1,4 @@+import astimport datetimeimport reimport time@@ -2811,7 +2812,7 @@ class CustomProfileField(models.Model):(CHOICE, str(_('List of options')), validate_choice_field, str, "CHOICE"),]USER_FIELD_TYPE_DATA: List[UserFieldElement] = [- (USER, str(_('Person picker')), check_valid_user_ids, eval, "USER"),+ (USER, str(_('Person picker')), check_valid_user_ids, ast.literal_eval, "USER"),]CHOICE_FIELD_VALIDATORS: Dict[int, ExtendedValidator] = {