Skip to content

Commit 064a656

Browse files
committed
add non-global IPs as forbidden
1 parent 96efc36 commit 064a656

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

backend/utils/ssrf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def is_forbidden_ip(ip: ipaddress.IPv4Address | ipaddress.IPv6Address) -> bool:
5454
or ip.is_reserved
5555
or ip.is_multicast
5656
or ip.is_unspecified
57+
or not ip.is_global
5758
)
5859

5960

0 commit comments

Comments
 (0)