claude-code - 💡(How to fix) Fix claude-in-chrome: output sanitizer blocks URLs with two query params [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56347Fetched 2026-05-06 06:30:34
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Code Example

if (e.includes("=") && (e.includes(";") || e.includes("&")))
  return "[BLOCKED: Cookie/query string data]";
RAW_BUFFERClick to expand / collapse

The javascript_tool output sanitizer blocks any string with = AND (; OR &), labeling it [BLOCKED: Cookie/query string data]. False-positives on every signed URL (S3/CloudFront/Skool/etc.) since ?a=1&b=2 matches.

Source: ~/Library/Application Support/Google/Chrome/Default/Extensions/<id>/<ver>/assets/mcpPermissions-*.js

if (e.includes("=") && (e.includes(";") || e.includes("&")))
  return "[BLOCKED: Cookie/query string data]";

Cookies are ;-separated and lack a scheme; URLs start with http(s)://. The rule should distinguish them.

Breaks the common pattern of returning a signed asset URL out of Chrome to curl from the shell.

extent analysis

TL;DR

The issue can be fixed by modifying the javascript_tool output sanitizer to distinguish between cookie strings and URLs.

Guidance

  • The current implementation blocks any string containing = and (; or &), which is too broad and causes false positives for signed URLs.
  • To fix this, the sanitizer should check if the string starts with a URL scheme (http:// or https://) before blocking it.
  • The condition in the if statement should be updated to account for this, possibly by adding a check for the presence of a URL scheme.
  • The updated condition could be if (e.includes("=") && (e.includes(";") || e.includes("&")) && !e.startsWith("http://") && !e.startsWith("https://")).

Example

if (e.includes("=") && (e.includes(";") || e.includes("&")) && !e.startsWith("http://") && !e.startsWith("https://"))
  return "[BLOCKED: Cookie/query string data]";

Notes

This fix assumes that all URLs will start with either http:// or https://, which may not be the case for all possible URLs (e.g., protocol-relative URLs).

Recommendation

Apply workaround: update the sanitizer condition to distinguish between cookie strings and URLs, as described above. This will prevent false positives for signed URLs while still blocking potential cookie/query string data.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix claude-in-chrome: output sanitizer blocks URLs with two query params [1 participants]