Rename variable

merge-requests/30/head
Bob Mottram 2021-06-09 11:11:32 +01:00
parent b7d0a83ac4
commit 194d801af8
1 changed files with 3 additions and 3 deletions

View File

@ -1372,7 +1372,7 @@ class PubServer(BaseHTTPRequestHandler):
""" """
# ensure that there is a minimum delay between failed login # ensure that there is a minimum delay between failed login
# attempts, to mitigate brute force # attempts, to mitigate brute force
if int(time.time()) - self.server.lastLoginAttempt < 5: if int(time.time()) - self.server.lastLoginFailure < 5:
self._503() self._503()
self.server.POSTbusy = False self.server.POSTbusy = False
return return
@ -1442,7 +1442,7 @@ class PubServer(BaseHTTPRequestHandler):
authHeader, False): authHeader, False):
print('Login failed: ' + loginNickname) print('Login failed: ' + loginNickname)
self._clearLoginDetails(loginNickname, callingDomain) self._clearLoginDetails(loginNickname, callingDomain)
self.server.lastLoginAttempt = int(time.time()) self.server.lastLoginFailure = int(time.time())
self.server.POSTbusy = False self.server.POSTbusy = False
return return
else: else:
@ -15096,7 +15096,7 @@ def runDaemon(city: str,
httpd.maxQueueLength = 64 httpd.maxQueueLength = 64
httpd.allowDeletion = allowDeletion httpd.allowDeletion = allowDeletion
httpd.lastLoginTime = 0 httpd.lastLoginTime = 0
httpd.lastLoginAttempt = 0 httpd.lastLoginFailure = 0
httpd.maxReplies = maxReplies httpd.maxReplies = maxReplies
httpd.tokens = {} httpd.tokens = {}
httpd.tokensLookup = {} httpd.tokensLookup = {}