[core] wrap IPv6 literal in "[]" in redirect URL