fix: tighten FIELD_PARSE_REGEX to only allow backticks (not double quotes)

This commit is contained in:
Sagar Vora 2025-12-01 23:59:45 +05:30
parent 72b1fe299d
commit 04932e20a0

View file

@ -119,7 +119,7 @@ ALLOWED_FIELD_PATTERN = re.compile(
# Group 2: Optional table name (e.g., `tabDocType` or tabDocType or `tabNote Seen By`)
# Group 3: Optional quote for field name
# Group 4: Field name (e.g., `field` or field)
FIELD_PARSE_REGEX = re.compile(r"^(?:([`\"]?)(tab[\w\s-]+)\1\.)?([`\"]?)(\w+)\3$")
FIELD_PARSE_REGEX = re.compile(r"^(?:(`?)(tab[\w\s-]+)\1\.)?(`?)(\w+)\3$")
# Direct mapping from uppercase function names to pypika function classes
FUNCTION_MAPPING = {