Badge Canonicalization produces invalid IPv6 instance domains #56

Closed
opened 2026-10-04 22:58:24 +02:00 by adam · 0 comments
Owner

https://github.com/l5yth/potato-mesh/blob/8db1d05e0e9b0ef2b25081163c55eca1a6c27f19/web/app.rb#L217-L223
P1 Badge Canonicalization produces invalid IPv6 instance domains

The new logic now accepts IP literals in INSTANCE_DOMAIN, but when an IPv6 URL such as http://[::1] is provided, the normalization strips the brackets and appends the port yielding ::1:80. That string cannot be interpolated into URLs (e.g. instance_uri_candidates builds https://#{base} and URI.parse fails), so deployments using IPv6 addresses will silently break where previously they were rejected with a clear error. IPv6 addresses need to retain their bracketed form when normalizing, otherwise the commit does not actually support IP-based domains for half the address family.

https://github.com/l5yth/potato-mesh/blob/8db1d05e0e9b0ef2b25081163c55eca1a6c27f19/web/app.rb#L217-L223 **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Canonicalization produces invalid IPv6 instance domains** The new logic now accepts IP literals in `INSTANCE_DOMAIN`, but when an IPv6 URL such as `http://[::1]` is provided, the normalization strips the brackets and appends the port yielding `::1:80`. That string cannot be interpolated into URLs (e.g. `instance_uri_candidates` builds `https://#{base}` and `URI.parse` fails), so deployments using IPv6 addresses will silently break where previously they were rejected with a clear error. IPv6 addresses need to retain their bracketed form when normalizing, otherwise the commit does not actually support IP-based domains for half the address family. <!-- github-sync-id:3506327094 -->
adam closed this issue 2026-10-04 22:58:24 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/potato-mesh#56