Files
Amber/app/src
Claude 3323d13397 Preserve port when matching relays against the auth whitelist
The whitelist check used java.net.URI(url).host, which drops the port,
so a "wss://relay.example.com:8080" event tag would not match a
"relay.example.com:8080" whitelist entry. Worse, URI parses a bare
"relay.example.com:8080" with the host as a scheme, so the host was
null and the input fell through to storage with the port — but the
incoming event side stripped it, guaranteeing a mismatch.

Centralize the parsing in RelayUrlUtils.extractHostAndPort, which
prepends "wss://" when no scheme is present and returns "host[:port]".
All six previously duplicated parse sites now share it.
2026-05-15 10:51:42 +00:00
..