From b37ac30dc65bee81cf23fadd884f19219558a508 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Fri, 17 Nov 2023 13:48:18 +0000 Subject: [PATCH] fix: raise error on validate keys --- frappe/auth.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/auth.py b/frappe/auth.py index 27aff63371..648f72f8e7 100644 --- a/frappe/auth.py +++ b/frappe/auth.py @@ -665,6 +665,8 @@ def validate_api_key_secret(api_key, api_secret, frappe_authorization_source=Non if frappe.local.login_manager.user in ("", "Guest"): frappe.set_user(user) frappe.local.form_dict = form_dict + else: + raise frappe.AuthenticationError def validate_auth_via_hooks():