fix(previews): a page can no longer pose as a YouTube (etc.) player via its og:url (#326) #403
Merged
jared
merged 1 commits from 2026-10-18 05:54:22 -04:00
fix/embed-ogurl-provider into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#403
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #326.
resolveEmbedfell back to the preview'sog:urlfor any posted link.og:urlcomes from the linked page itself, sohttps://evil.example/free-giftcould serveog:url = youtube.com/watch?v=…. It then rendered as a playable YouTube card of a video the attacker chose, with labels linking to evil.example.Change: new
sameProvider(url, ogUrl). Theog:urlfallback is used only when it's on the posted link's own provider: the same last two domain labels, with the provider's short-link domains folded in (youtu.be,youtube-nocookie.com→ youtube.com;spotify.link→ spotify.com;redd.it→ reddit.com;x.com→ twitter.com; …).vm.tiktok.comandon.soundcloud.commatch on their base domain.Verified in Chromium, with
preview_urlrouted to a hostile page's metadata (og:urlYouTube,og:site_nameYouTube):https://evil.example/free-gift, before: a YouTube card with a Play button. After: no embed and no Play.https://youtu.be/…with the sameog:url: still embeds, with Play.Unit tests cover evil.example, a
youtube.com.evil.examplelook-alike, youtu.be, m.youtube.com, vm.tiktok.com, spotify.link, on.soundcloud.com, redd.it, and garbage input.Note: the plain card still shows whatever
og:site_name/og:titlethe page claims, which is how every link preview works. Showing the real destination host on plain cards would be a separate change, alongside #286.tscclean · ESLint clean.🤖 Generated with Claude Code
https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5