Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Cecylia Bocovich <cohosh@torproject.org>
This commit is contained in:
Neel Chauhan 2024-10-17 23:09:27 +00:00
parent 7974463653
commit 5e4619bae1

View file

@ -706,7 +706,9 @@ func checkIsRelayURLAcceptable(
if !isRemoteAddress(ip) { if !isRemoteAddress(ip) {
return fmt.Errorf("rejected Relay URL: private IPs are not allowed") return fmt.Errorf("rejected Relay URL: private IPs are not allowed")
} }
} } else {
// move net.LookupIP(hostname) and isRemoteAddress checks here
}
} }
if !allowNonTLSRelay && parsedRelayURL.Scheme != "wss" { if !allowNonTLSRelay && parsedRelayURL.Scheme != "wss" {
return fmt.Errorf("rejected Relay URL protocol: non-TLS not allowed") return fmt.Errorf("rejected Relay URL protocol: non-TLS not allowed")