mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
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.