Skip to content

Daily review fixes: MCP Host refusals explained, security events kept, setup links measurable - #845

Merged
keysersoft merged 2 commits into
mainfrom
keysersoft/daily-review-fixes
Oct 5, 2026
Merged

keysersoft merged 2 commits into
mainfrom
keysersoft/daily-review-fixes

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

From the daily production review (4 Oct 2026).

  • MCP Host refusals: a customer's MCP connector behind a trycloudflare tunnel stayed at 0 tools; discovery failed 9 times with host not allowed / Invalid Host header. That is the remote server's DNS-rebinding protection refusing the tunnel hostname. The error now says which setting to change (allowedHosts). Applied where the MCP client connects, so every discovery path gets it.
  • Security events lost: Failed to persist security event 'TOKEN_REJECTED': Foreign key constraint violated (2× in 24h): the referenced user/org no longer exists. The event is now stored without the links, with the ids under metadata.unresolved.
  • Setup links: expired one-time links were deleted at the next link creation, so their usage could not be measured. Kept 7 days now; they still stop working at expiry (checked in resolveLink).

Tests: backend 6648 passed (+4 new).

…, setup links measurable

- A remote MCP server whose DNS-rebinding protection refuses our Host
  ("host not allowed" / "Invalid Host header") now gets an error that
  says to add the hostname to its allowed hosts. Seen on a customer's
  MCP connector behind a trycloudflare tunnel, stuck at 0 tools.
- A security event that references a deleted user or organization
  (TOKEN_REJECTED for a deleted user) was lost on the foreign key; it is
  now stored without the links, with the ids in its metadata.
- Expired one-time setup links stay in the table for a week instead of
  being deleted at the next link, so the share of links that get opened
  can be measured. They stop working at expiry as before.
@keysersoft
keysersoft requested a review from D3nisty as a code owner October 4, 2026 08:08
@keysersoft
keysersoft enabled auto-merge (squash) October 5, 2026 11:37
@keysersoft
keysersoft merged commit fefac94 into main Oct 5, 2026
13 checks passed
@keysersoft
keysersoft deleted the keysersoft/daily-review-fixes branch October 5, 2026 11:40
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant