fix: restrict send_login_link to POST method only

This commit is contained in:
Sagar Vora 2025-11-21 18:11:50 +05:30
parent 35077703a0
commit 2c774a75a2

View file

@ -140,7 +140,7 @@ def get_login_with_email_link_ratelimit() -> int:
return frappe.get_system_settings("rate_limit_email_link_login") or 5
@frappe.whitelist(allow_guest=True)
@frappe.whitelist(allow_guest=True, methods=["POST"])
@rate_limit(limit=get_login_with_email_link_ratelimit, seconds=60 * 60)
def send_login_link(email: str):
if not frappe.get_system_settings("login_with_email_link"):