mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Also check for mapped IPv4 when checking trusted IPs
This commit is contained in:
parent
c5dec9241f
commit
2728790cf8
@ -145,6 +145,7 @@ def parse_trusted_ips(spec):
|
||||
|
||||
|
||||
def is_ip_trusted(remote_addr, trusted_ips):
|
||||
remote_addr = getattr(remote_addr, 'ipv4_mapped', remote_addr)
|
||||
for tip in trusted_ips:
|
||||
if hasattr(tip, 'hosts'):
|
||||
if remote_addr in tip:
|
||||
|
Loading…
x
Reference in New Issue
Block a user