fix(sqli): Avoid SQL Injection with sender param (#16509)
This commit is contained in:
parent
385e3bb284
commit
9acb885e60
@ -16,7 +16,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
|
||||
|
||||
customer = frappe.db.sql("""select distinct dl.link_name from `tabDynamic Link` dl
|
||||
left join `tabContact` c on dl.parent=c.name where dl.link_doctype='Customer'
|
||||
and c.email_id='{email_id}'""".format(email_id=sender))
|
||||
and c.email_id = %s""", sender)
|
||||
|
||||
if not customer:
|
||||
lead = frappe.db.get_value('Lead', dict(email_id=sender))
|
||||
|
Loading…
x
Reference in New Issue
Block a user