You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Audit fixes from the post-be52cc1 9-dim review:
- CSS selector for the post-detail UrlAutoEmbed now targets the
.proto-row sibling directly. Previous selector targeted descendants
inside the sibling, so the wrapper class never matched and the
player rendered unstyled.
- Drop the allowYoutube alias on RenderMarkdownOptions. The alias
silently widened semantics from "YouTube only" to all three
platforms, which is a regression for any caller that opts in by
the old name. Only allowMediaEmbeds remains; both call sites
(MarkdownEditor preview, post-detail body render) migrated.
- Drop allow-same-origin from the Spotify and Apple iframe
sandboxes. Both load cookie-bearing hosts; without
allow-same-origin the iframe is forced into a unique opaque
origin so it can't read the reader's session cookies. The player
↔ parent communication uses postMessage which is cross-origin
safe. YouTube keeps allow-same-origin because youtube-nocookie.com
is the canonical privacy host and removing it breaks the embed
player controls.
- Centralize per-platform iframe attrs into lib/embed-attrs.ts so
the markdown sanitizer, the three pre-pass builders, and
UrlAutoEmbed all consume one source of truth. Future tightening
lands in one edit.
- End-anchor the Spotify path regex; reject malformed Apple ?i=
values instead of silently downgrading to a show embed.
- Strict CommonMark fence-close detection across all three
embed-pre-pass walkers. A line like `~~~more` inside a fence body
no longer terminates it; closers must carry no info string.
Tests: existing suite green; the spotify/apple/markdown-media tests
reflect the new sandbox shape. Two findings deferred:
- UrlAutoEmbed component-level test (needs project-wide React test
infrastructure not yet present)
- tokens.css migration (codebase uses theme.css for :root by
convention; project-wide migration is out of scope)
0 commit comments