Skip to content

feat(snapshot): Check "blocked" status of iframes before accessing contentDocument#201

Merged
billyvg merged 1 commit intosentry-v2from
fix-snapshot-block-iframe
Jun 14, 2024
Merged

feat(snapshot): Check "blocked" status of iframes before accessing contentDocument#201
billyvg merged 1 commit intosentry-v2from
fix-snapshot-block-iframe

Conversation

@billyvg
Copy link
Copy Markdown
Member

@billyvg billyvg commented Jun 13, 2024

Do not attempt to access contentDocument of iframe if element is blocked, otherwise it will trigger a browser warning. e.g.

Blocked a frame with origin "<foo>" from accessing a frame with origin "<bar>". Protocols, domains, and ports must match.

Fixes getsentry/sentry-javascript#6560

…ontentDocument`

Do not attempt to access `contentDocument` of iframe if element is blocked, otherwise it will trigger a browser warning. e.g.

`Blocked a frame with origin "<foo>" from accessing a frame with origin "<bar>". Protocols, domains, and ports must match.`
@billyvg billyvg marked this pull request as ready for review June 13, 2024 16:27
@billyvg billyvg requested a review from a team June 13, 2024 16:29
Copy link
Copy Markdown
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

ahh very nice catch, that makes sense!

@billyvg billyvg merged commit f5b09af into sentry-v2 Jun 14, 2024
@billyvg billyvg deleted the fix-snapshot-block-iframe branch June 14, 2024 14:54
chargome added a commit that referenced this pull request Apr 16, 2026
## Summary
- Bumps `markdownlint-cli` from `^0.31.1` to `^0.48.0`
- Also bumps `markdownlint` lib from `^0.25.1` to `^0.40.0` to match
- Replaces `glob` with `tinyglobby` (no more vulnerable glob dep)
- Uses `minimatch@10.2.5` (patched, replaces vulnerable 10.0.3)

## Breaking changes in markdownlint-cli 0.31 -> 0.48
- **Node.js >=20 required** (was >=12) — we use Node 20, not affected
- **`glob` replaced by `tinyglobby`** — internal dep swap, CLI interface
unchanged, not affected
- **`markdownlint` lib 0.25 -> 0.40** — internal engine upgrade,
switched to `markdown-it` parser. Some rules renamed/added. We only run
`markdownlint docs` with default config, existing warnings are
pre-existing, not affected
- **New/updated lint rules** — some rules added or tightened across
versions. Output now labels findings as "error" instead of bare rule
names. Cosmetic only, not affected
- **Config format additions** (TOML support added) — our config is
unchanged, not affected

## Dependabot alerts resolved
- Resolves glob command injection (high) — `glob` removed entirely,
replaced by `tinyglobby`
- Resolves minimatch ReDoS alerts via `minimatch@10.2.5`:
[#213](https://github.com/getsentry/rrweb/security/dependabot/213),
[#212](https://github.com/getsentry/rrweb/security/dependabot/212),
[#208](https://github.com/getsentry/rrweb/security/dependabot/208),
[#201](https://github.com/getsentry/rrweb/security/dependabot/201)
- Partially resolves brace-expansion alerts:
[#238](https://github.com/getsentry/rrweb/security/dependabot/238),
[#134](https://github.com/getsentry/rrweb/security/dependabot/134)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Customer issue: "Blocked a frame with origin <hostname> from accessing a cross-origin frame."

2 participants