From 425057b1506bbd4a1db6d390f28db9a6f83c6d96 Mon Sep 17 00:00:00 2001 From: riccardom Date: Mon, 14 Sep 2026 11:34:27 +0200 Subject: [PATCH] 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. --- shared/management/http/api/openapi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/shared/management/http/api/openapi.yml b/shared/management/http/api/openapi.yml index 1df128cb1..3987e92fd 100644 --- a/shared/management/http/api/openapi.yml +++ b/shared/management/http/api/openapi.yml @@ -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.