Browse Source

fix(minor): make group_by validation tighter

version-14
Rushabh Mehta 4 years ago
parent
commit
c9b367933a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/model/db_query.py

+ 1
- 1
frappe/model/db_query.py View File

@@ -745,7 +745,7 @@ class DatabaseQuery(object):
return return


_lower = parameters.lower() _lower = parameters.lower()
if 'select' in _lower and ' from ' in _lower:
if 'select' in _lower and 'from' in _lower:
frappe.throw(_('Cannot use sub-query in order by')) frappe.throw(_('Cannot use sub-query in order by'))


if re.compile(r".*[^a-z0-9-_ ,`'\"\.\(\)].*").match(_lower): if re.compile(r".*[^a-z0-9-_ ,`'\"\.\(\)].*").match(_lower):


Loading…
Cancel
Save