Username might not be at the start

merge-requests/28/head
Bob Mottram 2022-08-28 15:23:38 +01:00
parent 84d57590b8
commit 1d77869706
1 changed files with 2 additions and 1 deletions

View File

@ -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: