From ad7a5cfe49956839168df6ff4cb8df48e2940757 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 13 Aug 2022 20:55:36 +0100 Subject: [PATCH] Check token before attempting to confirm --- api/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 2e38a2a..e8fc7a1 100644 --- a/api/views.py +++ b/api/views.py @@ -588,5 +588,6 @@ class API(object): if not len(spl) == 2: return dumps({"success": False, "reason": f"malformed item: {item}"}) net, num = spl - regproc.confirmAccount(net, num, token) + if token: + regproc.confirmAccount(net, num, token) return dumps({"success": True})