mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-15 11:19:08 +02:00
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.
This commit is contained in:
@@ -390,7 +390,6 @@ components:
|
||||
URL with a host. Empty falls back to the deployment-wide value configured on the management server, and with
|
||||
neither to the upload service NetBird runs.
|
||||
type: string
|
||||
pattern: '^$|^https://[^/?#:\s]+(:[0-9]+)?([/?#].*)?$'
|
||||
example: "https://upload.example.com/upload-url"
|
||||
agent_network_only:
|
||||
description: Limits the dashboard to the Agent Network surface for this account. Set for accounts created via netbird.ai signups and can be disabled later. Enabling this requires dashboard_features.agent_network to be true in the same request.
|
||||
|
||||
Reference in New Issue
Block a user