-
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
Jetpack Comments: Different user ids in the environment when creating and verifying the nonce #32552
Comments
This comment was marked as outdated.
This comment was marked as outdated.
@cuemarie Have you tried with this setup?
For example. This is in an incognito window. on a Jurassic Ninja site.
|
The diagnosis here, matches mine
https://wordpress.org/support/topic/jetpack-comment-error-nonce-verification-failed/#post-16276738 |
Thanks @oskosk for the added details! It seems the issue was my Discussion Settings. Updated notes below: 📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain
📌 FINDINGS/SCREENSHOTS/VIDEO
Screenshots/RecordingsAtomic yZU3Lf.mp4L6VDl4.mp4Simple site did not reproduce the same error, and commenting worked as expected. 📌 ACTIONS
|
🔔Just a heads up FYI to @Automattic/loop as this impacts commenting/engagement. |
Thanks @cuemarie. Noting here that in the Jetpack Admin page settings we don't have that setting as it comes from core. In calypso both sets of settings are merged Jetpack -> Settings -> DiscussionSettings -> DiscussionCalypso |
Related:
|
I looked into this a bit. I was able to reproduce on one site (a brand new JN site, freshly connected to my a11n acount), but not on others. I was not able to figure out what was different about the site where I could reproduce. A few things to note:
The Verbum comment UI is slowly getting activated for more and more folks, and it does complicate testing in some scenarios since it does not always seem to reflect the current user situation on the site. In the example below, I was logged in as an admin on the site: In this scenario, I should be logged in in the comment form as well. I cannot seem to be able comment as a logged in user at the moment. In fact, one could argue that when you are locally logged in as admin, you may not need any type of Jetpack Comment UI; you are already logged in, you do not need any kind of social login option at this point. jetpack/projects/plugins/jetpack/modules/comments/base.php Lines 218 to 227 in 24b4c87
If we removed the Jetpack Comment UI when you're logged in, it would solve this issue. I think it may also avoid some confusion around Jetpack Comments and social login. It would, however, change the way Jetpack Comments have worked until today, and may potentially cause more confusion. At this point, I'm not sure how to move forward with this. @Automattic/vertex Since you've been working on Verbum, you're most likely the most familiar with this at the moment. Do you have any ideas? |
Our efforts are scattered across multiple places ATM, but we have this patch D123363-code. We need to address the issues there. |
We were fixing a related issue and to me it seems that this got fixed as well. |
@heavyweight This is still happening I'm afraid. |
Screen.Recording.2023-10-06.at.17.43.22.movNot sure what I'm doing wrong. |
I was having trouble reproducing as well; it happens on some of my sites, but not others. I haven't been able to understand why sometimes it works and sometimes it doesn't. |
A few users affected by this: 8481771-zen |
Support References This comment is automatically generated. Please do not edit it.
|
Another user reporting it on this forum thread: https://wordpress.org/support/topic/chrome-jetpack-gives-nonce-errors-firefox-jetpack-is-completely-fine/#post-17920955 |
The PR got merged #38554 |
@heavyweight - is there any chance that this could still be a problem? I'll refrain from reopening this, but we have a Jetpack user in 8669002-zen reporting this problem, and we're able to reproduce the |
After the merged PR I didn't expect to see this again. I suspect that this could be an old or cached nonce that got sent. |
I simply loaded the site and attempted to leave a comment on the latest post and got the |
@heavyweight are you able to give it a test following @lschuyler steps? |
I wasn't able to reproduce this issue unfortunately. |
@heavyweight are you able to offer some guidance on how to reply to the customer, if we aren't able to reproduce the issue? I tried and was also able to comment on one of their posts. thanks! |
It's always tricky with issues that we can't reproduce. We could ask again if the issue persist for the user in question and what authentication method was used for commenting: email or social login. |
On November 17 I experienced what appears to be a similar issue, if not the same issue, as I was unable to post a comment on my own site due to an invalid nonce error. The comment form showed that I was logged in. Given that we don’t seem to have any evidence collected for how frequently this impacts Jetpack customers’ ability to leave comments, I’m concerned that we could be overlooking something wider spread. Would it be possible to recognize these failures inside Jetpack so that we could have some idea of the incidence rate and any apparent patterns? My mind immediately jumps to long-running sessions as a suspect (without any other evidence) if we’ve been unable to resolve it. This because weird authentication issues can happen once tokens of various kinds expire. If this is related in any way to old browser sessions, the impact could be hitting hardest on those who are most prolific in engaging in online discussion — or at least those who are trying. |
Impacted plugin
Jetpack
Quick summary
In #23439 we added nonces to the comments system, which are not being verified properly, If you're signed in to the site.
The nonce is generated with the idea of the user visiting the site, but the validation happens under
id: 0
(anonymous)wp_verify_nonce
fails.Export-1692134613707.mp4
Steps to reproduce
Nonce verification failed
message.A clear and concise description of what you expected to happen.
I expected to be able to write a comment being signed in.
What actually happened
I can't write a comment
Impact
Some (< 50%)
Available workarounds?
No and the platform is unusable
Platform (Simple and/or Atomic)
No response
Logs or notes
No response
The text was updated successfully, but these errors were encountered: