Revert "fix(security): Disallow unnecessary characters in group_by and fields"
This reverts commit fb8993663c.
This commit is contained in:
parent
eec9ee86e3
commit
ce60f98ab6
1 changed files with 0 additions and 6 deletions
|
|
@ -240,9 +240,6 @@ class DatabaseQuery(object):
|
|||
|
||||
_is_query(field)
|
||||
|
||||
invalid_characters_regex = r".*[^a-zA-Z0-9-_ ,`'\"\*\.\(\)].*"
|
||||
if re.match(invalid_characters_regex, field):
|
||||
frappe.throw(_("Illegal characters in SQL query"))
|
||||
|
||||
def extract_tables(self):
|
||||
"""extract tables from fields"""
|
||||
|
|
@ -691,9 +688,6 @@ class DatabaseQuery(object):
|
|||
if 'select' in _lower and ' from ' in _lower:
|
||||
frappe.throw(_('Cannot use sub-query in order by'))
|
||||
|
||||
invalid_characters_regex = r".*[^a-z0-9-_ ,`'\"\.\(\)].*"
|
||||
if re.match(invalid_characters_regex, _lower):
|
||||
frappe.throw(_("Illegal characters in SQL query"))
|
||||
|
||||
for field in parameters.split(","):
|
||||
if "." in field and field.strip().startswith("`tab"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue