Skip to content

fix: validate X-Umami-Host with actionable errors (refs #29) - #31

Merged
Macawls merged 1 commit into
mainfrom
fix/validate-umami-host
Aug 15, 2026
Merged

fix: validate X-Umami-Host with actionable errors (refs #29)#31
Macawls merged 1 commit into
mainfrom
fix/validate-umami-host

Conversation

@Macawls

@Macawls Macawls commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Validate X-Umami-Host (and the stdio-config equivalent) at the top of Authenticate(). If it's missing an http:///https:// scheme, return a clear message naming the offending value. If it's the literal string **********, return a message that specifically points at MCP-client secret-redaction placeholders (e.g. OpenHands) leaking into the outbound request.
  • No behavior change for valid inputs; the current cryptic Go net/url parse error (first path segment in URL cannot contain colon) is replaced with something actionable.

Context

Follow-up to #29 (OpenHands 1.12.0 fails to initialize the server). Root cause on the client side is a combination of: (a) OpenHands' MCP settings form parsing headers as KEY=VALUE (equals-separated, not Key: value), which silently discards HTTP-style entries; and (b) a known family of bugs (see OpenHands PR #16144, SDK issue #4096, SDK PR #4097) where the redacted-secret placeholder ********** leaks back into outbound requests after an edit/save cycle. Either failure mode produced an opaque parse error on our side; this PR makes both diagnosable.

Test plan

  • go test ./... passes locally
  • go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 run ./... clean
  • New tests cover missing-scheme and redacted-placeholder cases

When the host lacks a scheme or is the literal string `**********`, return
a clear JSON-RPC error explaining the problem instead of a cryptic Go
`net/url` parse error. The `**********` case specifically catches
OpenHands' redacted-secret placeholder leaking into outbound MCP requests
(refs #29).
@Macawls Macawls mentioned this pull request Aug 13, 2026
@Macawls
Macawls merged commit e163eb9 into main Aug 15, 2026
8 checks passed
@Macawls
Macawls deleted the fix/validate-umami-host branch August 15, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant