Repository navigation
VideoPress Channel: only open a video page for a video uploaded to this site - #53501
Conversation
On WordPress.com, videopress_get_post_id_by_guid() returns the post ID of whichever blog owns the GUID. Channel::attachment_id() trusted it, so a foreign GUID could route /videopress?v=<guid> to an unrelated local post that shares that ID. Every candidate must now be this blog's attachment carrying the same GUID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Videopress plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 1 file.
|
Proposed changes
Channel::attachment_id()now returns a post ID only when it is this site's attachment carrying the same VideoPress GUID.videopress_get_post_id_by_guid()returns the post ID of whichever site owns the GUID, so/videopress?v=<guid>for another site's video could route to an unrelated local post with the same ID.Part 1 of 10 of a stacked series
The VideoPress channel theme support is split so each change can be reviewed, tested and deployed on its own. Each PR is based on the previous one; merge them in order.
→ 1. #53501 — VideoPress Channel: only open a video page for a video uploaded to this site
2. #53502 — Video Playlist: keep channel video links in the same tab and mark the video being viewed
3. #53503 — VideoPress Channel: add the data layer for the channel blocks
4. #53504 — VideoPress Channel: a page per playlist
5. #53505 — Latest Videos Playlist: sorting, search, length filter and pages
6. #53506 — VideoPress: add a Channel Details block
7. #53507 — VideoPress: add a Video Details block and let the video block play the newest upload
8. #53508 — VideoPress: add a Playlist Details block
9. #53509 — VideoPress: add an Episode Navigation block
10. #53510 — VideoPress Channel blocks: empty states
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jp test php packages/videopress(Channel_Data_Scoping_Testcovers a foreign site's ID and a non-attachment post )./videopress?v=<guid of a video from another site>: it 404s instead of showing a local post. A GUID of this site's own upload still opens its page.🤖 Generated with Claude Code