From e30250603b15ccdd1b6b83dfc0987c764bd24615 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 14 Aug 2022 16:09:32 +0100 Subject: [PATCH] Convert num to number in registration confirmation --- api/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/views.py b/api/views.py index 275fa42..660e716 100644 --- a/api/views.py +++ b/api/views.py @@ -654,6 +654,9 @@ class API(object): if not len(spl) == 2: return dumps({"success": False, "reason": f"malformed item: {item}"}) net, num = spl + if not num.isdigit(): + return dumps({"success": False, "reason": "invalid num: not a number."}) + num = int(num) if token: regproc.confirmAccount(net, num, token) return dumps({"success": True})