Verbum Comments: fix blocked commenting from cookies - #50396
Conversation
|
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! |
Code Coverage SummaryCoverage changed in 4 files.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
9e1a144 to
c29c92f
Compare
e530cf1 to
bcab102
Compare
fc7ab6a to
3ed2d4c
Compare
…missions - Detect unpartitioned cookie access via hasStorageAccess() instead of a write-and-read-back probe, which passes in a partitioned jar - Explain to the visitor why WordPress.com login is unavailable - Block submission when login is required but cannot be completed
ec98ecd to
3361e93
Compare
Fixes CM-841
Proposed changes
When a site requires visitors to log in before commenting, Verbum can end up in a dead end: the browser blocks the cookies the login buttons depend on, so no login options render, but the email form is still offered. The visitor writes a comment, submits it, and gets "Sorry, you must be logged in to comment."
Only affects visitors who are already blocked. If cookies are readable, nothing changes.
Does this pull request change what data or activity we track or use?
No.
Testing instructions
You need an Atomic site with Settings → Discussion → "Users must be registered and logged in to comment" enabled, plus a browser that blocks third-party cookies (Safari by default, or Chrome with third-party cookies blocked).
Atomic matters: Verbum runs inside the Jetpack comments iframe there, so it's third-party content and its cookies get blocked. On Simple the form is first-party and this path never triggers.
Also worth a pass on a site without the login requirement, in the same browser, to confirm the email form still shows and guest commenting is untouched.