fix lan server test for real this time
This commit is contained in:
parent
3ed2ac2d63
commit
a24c87c5b0
3 changed files with 5 additions and 4 deletions
|
@ -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:')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue