fix: rate limit for all HTTP methods (#21929)
This commit is contained in:
parent
fd2efdb0e1
commit
2b96324c31
2 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue