mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
...
This commit is contained in:
parent
386664e184
commit
3fd7c28695
@ -145,7 +145,7 @@ def parse_trusted_ips(spec):
|
|||||||
|
|
||||||
|
|
||||||
def is_ip_trusted(remote_addr, trusted_ips):
|
def is_ip_trusted(remote_addr, trusted_ips):
|
||||||
remote_addr = getattr(remote_addr, 'ipv4_mapped', remote_addr)
|
remote_addr = getattr(remote_addr, 'ipv4_mapped', None) or remote_addr
|
||||||
for tip in trusted_ips:
|
for tip in trusted_ips:
|
||||||
if hasattr(tip, 'hosts'):
|
if hasattr(tip, 'hosts'):
|
||||||
if remote_addr in tip:
|
if remote_addr in tip:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user