From 1d778697065926c3d1932d8ba35927f59a917781 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 28 Aug 2022 15:23:38 +0100 Subject: [PATCH] Username might not be at the start --- webapp_login.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp_login.py b/webapp_login.py index c55ab06bc..1d4490289 100644 --- a/webapp_login.py +++ b/webapp_login.py @@ -27,7 +27,8 @@ def html_get_login_credentials(login_params: str, """Receives login credentials via HTTPServer POST """ if not login_params.startswith('username='): - return None, None, None + if '&username=' not in login_params: + return None, None, None # minimum time between login attempts curr_time = int(time.time()) if curr_time < last_login_time + 10: