Skip to content

Ignore wildcard hosts in the iframe allow attribute - #595

Open
marcoscaceres wants to merge 1 commit into
mainfrom
attribute-ignores-wildcard-hosts
Open

marcoscaceres wants to merge 1 commit into
mainfrom
attribute-ignores-wildcard-hosts

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Chromium, Gecko and WebKit don't match wildcard hosts like https://*.example.com in the iframe allow attribute: Chromium rejects them, and Gecko and WebKit never match them. This makes the attribute ignore such entries, while the Permissions-Policy header keeps the wildcard support added in #516.

Tests: web-platform-tests/wpt#63313


Preview | Diff

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

๐ŸŸข Approval recommended

The focused algorithm change correctly implements the stated browser-compatible behavior without affecting header parsing.

Review effort: Balanced
Findings: None

What changed in this PR

Updates iframe allow parsing to ignore wildcard host entries while preserving wildcard support for HTTP headers.

Changes:

  • Rejects parsed iframe allowlist origins whose domain contains *.
  • Retains existing handling for valid, non-opaque origins.
File Description
index.bs Excludes wildcard domains from iframe allow expressions.

๐Ÿ’ก Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@arichiv

arichiv commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

I'm fine with this going in as-is since it described reality, but alternately should we allow this? @clelland

@arichiv arichiv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rebase

This branch has not been deployed

No deployments
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.

3 participants