fix lan server test for real this time

This commit is contained in:
Kevin Froman 2020-06-21 14:23:46 -05:00
parent 3ed2ac2d63
commit a24c87c5b0
3 changed files with 5 additions and 4 deletions

View file

@ -52,7 +52,7 @@ class LANServer:
@app.before_request
def dns_rebinding_prevention():
if request.remote_addr in lan_ips or ipaddress.ip_address(request.remote_addr).is_loopback:
if time.time() - _start_time < 600:
if time.time() - _start_time > 600:
abort(403)
if request.host != f'{self.host}:{self.port}':
logger.warn('Potential DNS rebinding attack on LAN server:')