mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-16 02:11:39 +00:00
fix: restrict state-changing whitelisted endpoints to POST (#56858)
Add methods=["POST"] to 50 whitelisted functions that create or modify documents (get_doc followed by insert/save/submit), so they can no longer be invoked via GET requests. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ def make_subcontract_return(source_name: str, target_doc: Document | str | None
|
||||
return make_return_doc("Subcontracting Receipt", source_name, target_doc)
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
@frappe.whitelist(methods=["POST"])
|
||||
def make_purchase_receipt(
|
||||
source_name: Document | str,
|
||||
target_doc: Document | str | None = None,
|
||||
|
||||
Reference in New Issue
Block a user