Fixed Security error message when clicking alert tab

Spartan

Well-known member
Affected version
2.0
I got this a couple times in the last few minutes. Reloading solves the problem, but I figured I'd let you know.

I'm using an iPad, with Safari.


IMG_0618.webp
 
Bump.

My users tell me this often happens on mobile devices, when they're moving on the public transport, switching between 3g/public wifi constantly.

Couldn't reproduce it myself in my office, but still.

Never happened with xF 1.x.

Can I do something with it?
 
So this is an odd one, visit this thread https://xenforo.com/community/threads/user-sessions-external-site.136028/ and try to open "Alerts"

Capture.webp

Refreshed to try again, same thing
 
I think this happened to me after I let Chrome reopen a tab that I had opened like an hour ago, so the page was loaded from the cache instead of from the server. Either way, the thing that comes to my mind is that the security token that is used to verify the ajax call might simply expired, because you were inactive for too long.
 
Sometimes i too get this error, refreshing page do solve the issue.
This happens at my and xF site too.

Case page is open in browser u minimize it for some time due to any reason.
When you come back, and open browser
Page loads automatically from cache and update alert area too by connecting server.

When i see alert on cache load page and i click on it, i get security error.

I use max time on android phone and this is what i experianced about this issue.
 
The only time I see this is when I have browsed on my PC then use my phone or iPad but try to open the alerts menu without refreshing the page.
 
I've merged the second report into the original one.

Unfortunately, I haven't actually reproduced this, though I know Chris has managed to see it once or twice (though not on desktop).

The CSRF token system is different in XF2. It's not tied to your account any longer, but just a cookie. Provided you have a CSRF cookie, all subsequent pages/tabs should use that. So I'm not actually seeing why this would happen, unless cookies are getting manipulated. (Loading a page from cache without hitting the server in a new browser session could also do it I suppose, because presumably you wouldn't have a cookie then, though that should certainly be an edge case. Ideally, if a browser is loading from cache, it should really be maintaining session cookies as well.)
 
I got this error on an Android phone using the Chrome browser.

It happened after I had shut down the browser, and turned off the phone. When I turned the phone back on and opened Chrome the next day, there was an alert and I got the security error message when I clicked on it.

I'm thinking Cookies :)
 
I tried to reproduce the error on my iPhone running IOS 11.1

1. I kept the browser tab open (xenforo.com/community) an I kept my account logged in

2. I went to the settings > Saffari > Advanced > Website Data

3. From there I deleted (xenforo.com) and I went back to my safari browser where I left the community tab open.

4. Now click on the notification or inbox tab and VOILA the security error windows will appears.

The question is, is xenforo cookies have a time limit so if some one left the browser open and come back after some hours will see that error since the coockies been deleted during the time limit ???!!!
 

Attachments

  • B94819F9-4353-4F4C-A3AE-B12E8B2C3581.webp
    B94819F9-4353-4F4C-A3AE-B12E8B2C3581.webp
    60.3 KB · Views: 11
I've tried to make some changes here such that if the CSRF cookie doesn't exist (when the page is loaded), we will try to get one. Let us know if you run into this with RC2 or after.

If this doesn't resolve the issue, then I'd have to guess that the cookie isn't actually being stored as expected though I can't see why that would really happen.
 
Back
Top Bottom