-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix jetpack comments via chrome when logged in #38554
Conversation
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Just dropping a comment here as well to say I left a comment in Slack about this - p1721979363629269/1721951133.674309-slack-CDLH4C1UZ - but there appears to be related work happening in #38485 as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works great!
I'm fine with merging this once the static analysis is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too 👍 Thanks for working on this fix!
I left two comments, but I wouldn't call them blockers, as they're just related to comments.
Fix wording Co-authored-by: Karen Attfield <[email protected]>
Looking at this PR after @simison pinged me about it... If I understand it correctly, the It's certainly a workaround -- the ideal solution will be that the Verbum iframe asks for storage access ( But we are still a long way from that: first we need to migrate the WP.com REST proxy away from auth cookies and only then we can start calling Storage Access API on individual widgets. |
I don't expect any changes for simple sites here since simple sites don't use the iframe. This PR is just for jetpack sites that are not atomic. Since I wasn't able to replicate this issue on atomic at all. No, the reason why this is needed is because when the you submit the comment. The iframe make a JS POST form submission request to the site. See fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Szh%2Qcyhtvaf%2Swrgcnpx%2Spynff.wrgcnpx%2Qeraqrere.cuc%3Se%3Q0rrqp613%231288-og but in chrome that request doesn't contain any cookie info. So on the Jetpack side the nonce verification fails because the request doesn't have a logged in user. I think in the ideal case we would be making a different authenticated request request to the Jetpack site from the iframe. |
Fixes #38520
Before:
Screen.Recording.2024-07-25.at.4.28.24.PM.-.before.mov
After:
Screen.Recording.2024-07-25.at.4.29.30.PM.-.after.mov
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Enable jetpack comments.
In latest Chrome login to wordpress.com as well the jetpack site. leave a comment.
Notice that you are able to leave a comment successfully. There might be a slight glitch with the spinner that you might notice but I think this is a better solution that currently exists.