Reject proxy requests to 0.0.0.0 as well

This commit is contained in:
Angus Lees
2021-07-30 20:12:48 +10:00
parent 2af53e9f64
commit 05cc0fb1df
2 changed files with 3 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ func IsProxyableIP(ip string) error {
}
func isProxyableIP(ip net.IP) error {
if ip.IsLoopback() || ip.IsLinkLocalUnicast() || ip.IsLinkLocalMulticast() || ip.IsInterfaceLocalMulticast() {
if !ip.IsGlobalUnicast() {
return ErrAddressNotAllowed
}
return nil