Browse Source

fix: validate hmac unconditionally (#28372)

develop
Ankush Menat 3 years ago
committed by GitHub
parent
commit
c0f06bc8e3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      erpnext/erpnext_integrations/utils.py

1
erpnext/erpnext_integrations/utils.py

@ -23,7 +23,6 @@ def validate_webhooks_request(doctype, hmac_key, secret_key='secret'):
)
if frappe.request.data and \
frappe.get_request_header(hmac_key) and \
not sig == bytes(frappe.get_request_header(hmac_key).encode()):
frappe.throw(_("Unverified Webhook Data"))
frappe.set_user(settings.modified_by)

Loading…
Cancel
Save