You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discovery Decode accepts an orchestrator address with an empty fragment #99
discovery/shared.Decode accepts an orchestrator address that ends in a bare #, such as https://orch.example/deployment#. The schema rejects it, and standalone discovery then serves it in a body the schema also rejects.
Cause: url.Parse drops an empty fragment. u.Fragment is "" and RawFragment isn't set, so ValidateURL can't tell that a # was there. This is the same gap as the ? case, which is already caught through ForceQuery.
body:= []byte(`[{"address":"https://orch.example/deployment#","runners":[{"url":"https://orch.example/app","app":"example","observed_at":"2026-10-22T18:05:00Z"}]}]`)
entries, err:=shared.Decode[discoveryRunner](body, time.Now())
// err == nil; schema rejects body// shared.Merge(entries) re-served as {"address","runners"} still has ".../deployment#"; schema rejects it
Possible fix: in Decode, skip an entry whose raw address contains #, the same as any other invalid address. Add a regression case for …/deployment# in TestDecodeValidation and the schema corpus.
I found this with a fuzz test that runs everything Decode accepts back through the discovery envelope and checks it against the schema.
Activity
j0sh commentedon Dec 5, 2026
Fixed in #122 thanks for the report