redos vuln patch (issue #5310)

This commit is contained in:
Somdev Sangwan 2023-02-08 16:37:44 +05:30 committed by GitHub
parent 4357b0087d
commit 19ca7c7e8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1822,7 +1822,7 @@ def expandAsteriskForColumns(expression):
the SQL query string (expression)
"""
match = re.search(r"(?i)\ASELECT(\s+TOP\s+[\d]+)?\s+\*\s+FROM\s+(([`'\"][^`'\"]+[`'\"]|[\w.]+)+)(\s|\Z)", expression)
match = re.search(r"(?i)\ASELECT(\s+TOP\s+[\d]+)?\s+\*\s+FROM\s+(([`'\"][^`'\"]+[`'\"])+|[\w.]+)(\s|\Z)", expression)
if match:
infoMsg = "you did not provide the fields in your query. "