This commit is contained in:
Daniel Perna 2018-07-15 23:46:56 +02:00
parent a17ca89819
commit af434188a2

View file

@ -3681,8 +3681,7 @@ class RequestHandler(BaseHTTPRequestHandler):
req = urlparse(self.path)
if SESAME or TOTP:
chunk = req.path.split("/")[-1]
if SESAME:
if chunk == SESAME:
if SESAME and chunk == SESAME:
if self.client_address[0] not in ALLOWED_NETWORKS:
ALLOWED_NETWORKS.append(self.client_address[0])
if self.client_address[0] in BANNED_IPS:
@ -3698,8 +3697,7 @@ class RequestHandler(BaseHTTPRequestHandler):
}
notify(**data)
return
if TOTP:
if TOTP.verify(chunk):
if TOTP and TOTP.verify(chunk):
if self.client_address[0] not in ALLOWED_NETWORKS:
ALLOWED_NETWORKS.append(self.client_address[0])
if self.client_address[0] in BANNED_IPS: