Skip to content
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

ANTIFORGERY_ID_mismatch. Expecting... #237

Open
planet4 opened this issue May 5, 2020 · 12 comments
Open

ANTIFORGERY_ID_mismatch. Expecting... #237

planet4 opened this issue May 5, 2020 · 12 comments

Comments

@planet4
Copy link

planet4 commented May 5, 2020

We are using the plug in for our intranet and some other internal WP sites. In general it works fine but a few users sometimes get the error below.
We are using the Force login plug-in in order to have our users to be logged in automatically.

In would be very happy if someone could point me in the right direction to understand what is causing this error.

wpfel

@ajl80
Copy link

ajl80 commented May 18, 2020

Hi,
I am also having this issue.

@psignoret
Copy link
Owner

@andyleese @planet4 Can you please share some details on how you're hosting WordPress?

@ajl80
Copy link

ajl80 commented May 18, 2020

its
Self Hosted
Windows Server
IIS :10.0
PHP :7.1.7
Wordpress : 5.3.2

it writes sessions to temp fine
I've tried disabling WP Super Cache plugin.
like @planet4 said, it seems to be random users.

@psignoret
Copy link
Owner

psignoret commented May 18, 2020

A couple more questions:

  • Are you running WordPress on a single service or on multiple instance?
  • Is the blog served from both HTTP and HTTPS? If yes, are you able to reproduce the issue if you try to access with http://... (but then get redirected back after sign-in to https://...)? Or vice versa?

@ajl80
Copy link

ajl80 commented May 18, 2020

its a network setup

OK if I put http://... it seems to work, signs in to https://...
else https://... errors (but not for everyone)

@planet4
Copy link
Author

planet4 commented May 19, 2020

Exactly the same issue here. Running on Ubuntu server 18.04 with apache. http is redirected to https. Just a few users gets this occasionally. WP is running in a single instance.

@Ssy3
Copy link

Ssy3 commented Jun 20, 2020

I just downgrade WordPress to 5.3.4 using the following plugin:
https://wordpress.org/plugins/wp-downgrade/

and everything working fine, we hope to find a solution for this issue in the newer version of Wordpress.

@Ssy3
Copy link

Ssy3 commented Aug 21, 2020

Create a new Azure AD app and update WordPress to the latest version.

@i-am-dan
Copy link

Not sure if it's the same issue but, make sure you are calling the 'authenticate' filter from the page it's redirecting to after getting the code. I had this issue when I signed in from another page (not wp-login) and the redirect url was set to wp-login.php.

@chris18890
Copy link

I've discovered that if your config/site has "Set-Cookie -SameSite=Strict", it will interfere with SSO & the anti-forgery ID being passed

@mmirandab
Copy link

He descubierto que si vuestro config/sitio tiene "Set-Cookie -SameSite=Strict", interferirá con SSO & el anti-falsificación ID que es pasado

How can i change this option?

@chris18890
Copy link

chris18890 commented Aug 24, 2021

@mmirandab depends on how you're hosting your wesbite - if it's self-hosted/on a VPS, it's easy enough to change; for apache it's a matter of modifying the relevant "Set Header in the config file (/etc/apache2/conf-available/security.conf for apache on ubntu), & reloading/restarting apache, I'd assume other web servers like NGINX and/or other distros like debian/RHEL-based will be similar. If you're using a managed hosting package - the short answer is I dunno/it depends on the platform/provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants