Skip to content

Commit

Permalink
Ignore user attributes with special charecters other than underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachinbisht27 committed Jun 29, 2024
1 parent 1693828 commit 82ef38c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/services/user_attribute_service.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
from typing import Any

from api import db, models
Expand All @@ -17,6 +18,9 @@ def handle_contact_fields_data(self, contact_data: dict[str, Any]):
self.user_id
)
for field_key, field_value in contact_fields_data.items():
if not re.match(r"^\w+$", field_key):
continue

value = field_value.get("value")
user_attribute = existing_attributes.get(field_key)

Expand Down

0 comments on commit 82ef38c

Please sign in to comment.