Merge branch 'develop' of https://github.com/frappe/frappe into events_ref_v13
This commit is contained in:
commit
c873ab87f0
2 changed files with 1 additions and 7 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"):
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ def render_template(template, context, is_path=None, safe_render=True):
|
|||
or (template.endswith('.html') and '\n' not in template)):
|
||||
return get_jenv().get_template(template).render(context)
|
||||
else:
|
||||
if safe_render and "__" in template:
|
||||
if safe_render and ".__" in template:
|
||||
throw("Illegal template")
|
||||
try:
|
||||
return get_jenv().from_string(template).render(context)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue