Skip to content

fix(mcp): use protocol blocklist instead of allowlist#39600

Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:fix-39569
Mar 10, 2026
Merged

fix(mcp): use protocol blocklist instead of allowlist#39600
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:fix-39569

Conversation

@pavelfeldman
Copy link
Member

Summary

  • Switch from an allowlist (_allowedProtocols: ['http:', 'https:', 'about:', 'data:']) to a blocklist (_disallowedProtocols: ['file:']) for URL protocol checks in MCP context
  • This unblocks chrome-extension:// and other non-file protocols without requiring allowUnrestrictedFileAccess: true

Fixes #39569

Switch from allowlist (_allowedProtocols) to blocklist
(_disallowedProtocols) so that chrome-extension:// and other
non-file protocols are no longer blocked by default.

Fixes: microsoft#39569
@github-actions
Copy link
Contributor

Test results for "MCP"

5153 passed, 164 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [webkit-library] › library/proxy.spec.ts:127 › should allow bypassing [::1] requests @webkit-ubuntu-22.04-node20
❌ [playwright-test] › reporter-markdown.spec.ts:158 › report with annotations @macos-latest-node20

7 flaky ⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-page] › page/page-request-continue.spec.ts:754 › propagate headers cross origin redirect after interception `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-page] › page/page-request-continue.spec.ts:754 › propagate headers cross origin redirect after interception `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@macos-latest-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:433 › should work behind reverse proxy `@macos-latest-node20`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:242 › should print beforeAll console messages once `@windows-latest-node20`

38925 passed, 842 skipped


Merge workflow run.

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.

[Feature]: Official support for loading extensions in Playwright MCP

2 participants