fix: rate limit for all HTTP methods (#21929)

This commit is contained in:
Sagar Vora 2023-08-05 17:02:55 +00:00 committed by GitHub
parent fd2efdb0e1
commit 2b96324c31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1010,7 +1010,7 @@ def sign_up(email: str, full_name: str, redirect_to: str) -> tuple[int, str]:
@frappe.whitelist(allow_guest=True)
@rate_limit(limit=get_password_reset_limit, seconds=24 * 60 * 60, methods=["POST"])
@rate_limit(limit=get_password_reset_limit, seconds=24 * 60 * 60)
def reset_password(user: str) -> str:
if user == "Administrator":
return "not allowed"

View file

@ -429,7 +429,7 @@ def get_web_form_module(doc):
@frappe.whitelist(allow_guest=True)
@rate_limit(key="web_form", limit=5, seconds=60, methods=["POST"])
@rate_limit(key="web_form", limit=5, seconds=60)
def accept(web_form, data):
"""Save the web form"""
data = frappe._dict(json.loads(data))