fix: Strip comments before sanitizing column_name
This commit is contained in:
parent
d694753b17
commit
d8e91cae32
1 changed files with 2 additions and 0 deletions
|
|
@ -1278,7 +1278,9 @@ def make_filter_dict(filters):
|
|||
|
||||
def sanitize_column(column_name):
|
||||
from frappe import _
|
||||
import sqlparse
|
||||
regex = re.compile("^.*[,'();].*")
|
||||
column_name = sqlparse.format(column_name, strip_comments=True, keyword_case="lower")
|
||||
blacklisted_keywords = ['select', 'create', 'insert', 'delete', 'drop', 'update', 'case', 'and', 'or']
|
||||
|
||||
def _raise_exception():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue