Files
netbird/shared/management/http/api/openapi.yml
T
riccardom 425057b150 Revert "[management] Put the debug upload URL's https-and-host rule in the OpenAPI schema"
This reverts commit a8817cab0.

The pattern was meant to mirror DebugUpload.Validate, and it does not. Go's
url.Parse lowercases the scheme and accepts a bracketed IPv6 literal, so all
three validators take `HTTPS://example.com` and `https://[2001:db8::1]/bundle`
while the regex rejects both; in the other direction the regex accepts control
characters in the path that url.Parse refuses. Measured, 3 of 4 sample values
disagreed.

A schema that rejects what the API accepts is worse than one that says nothing,
and chasing url.Parse with a regex just creates a second rule to keep in sync.
The prose description already states the requirement, and the handler stays the
thing that enforces it.

Reported by cubic on #7514, which offered dropping the pattern as the
alternative to fixing it.
2026-09-14 11:34:27 +02:00

490 KiB