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:
rohitwaghchaure
2026-07-03 18:47:13 +05:30
committed by GitHub
parent 9c911438f1
commit 341a07dffa
38 changed files with 52 additions and 52 deletions

View File

@@ -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,