-
Notifications
You must be signed in to change notification settings - Fork 62
Fatal error: Session validation failed #69
Comments
I'm experiencing similar problems. Problem is that this is happening very sporadically. I put var_dump's in every validator and waited for it to happen again. I managed to track this down to the Id validator.
The regular expression obviously fails because of When the hash bits are set to 6, the validation succeeds. The question I have is, why does the session id contains that value while the hash bits are set to 5. |
I have the same issue... after I have applied SSL on the production server. And unfortunately I have no idea how to fix it.... |
I'd love to fix this, but without a way to reproduce it, I have no way to proceed; any attempted fix would be guesswork at this point. If somebody who experiences the issue is able to isolate and create a reproduce case, please post it here or via a pull request with a failing test. Thanks! |
Hi, was able to reproduce this issue. My session has 2 validators assigned I consider this to be the expected behaviour, so IMO you have 2 choices:
Rolando Isidoro |
I have this exception only in google chrome (in firefox everything is fine):
I removed all session validators. I remove all cookies but site opens in google chrome only in one mode: desktop or mobile. It looks like it is related to one simple fact: |
I have added reproduced case up here in my post. But it doesn't looks like a bug at least in my case because of google chrome. |
Could you also post (if of any relevance) the chrome web console output ? |
I believe it is correct behaviour. As you noted the user agent is different when you are switching between mobile and desktop view (developer tools). So session is created with one UserAgent and when you change the it and refresh the page session validation is failing due to different UserAgent. Exactly the same behaviour you'll get with RemoteAddr but this might be harder to reproduce. The behaviour is described in the documentation: In general I am not sure if it is correct behaviour to throw exceptions, I think I would prefer new session to be generated in case of failed validation, but this will be BC Break. @weierophinney / @Xerkus What do you think? |
@jcaillot here is: Request headers of desktop mode for google chrome:
After that, I switch to the mobile mode and get HTTP ERROR 500. With this error I can't see any cookies or headers. Next what I am doing I delete all cookies and cache data of the page. After that I refresh the page in that same mobile mode and here is request headers of mobile mode in google chrome:
In this example cookies is different because I delete them all previously, but you should pay attention at different "User-Agent" of desktop and mobile mode. In the firefox "User-Agent" is the same in both modes and cookies is the same too. |
@webimpress but I have removed all validators:
And the behavior of google chrome is the same. But this is true only for remote server. At my local server I don't get any error in google chrome when switching between modes. |
I have deployed my project at first time yesterday at my remote server. At my local server I have added APPLICATION_ENV variable to apache2 config. At remote server I did not add this var to the apache2. At local server my /data/cache folder is emty. But at remote server I see two new files inside /data/cache. After removing these cache-files site works fine in both modes: desktop and mobile at google chrome. But it works without session validators. @webimpress , thank you for your help at zf chat. |
This repository has been closed and moved to laminas/laminas-session; a new issue has been opened at laminas/laminas-session#9. |
If computer only one browser. then open the size is ok.
If have other browser, like open the site use chrome. it's ok, then open the site use firefox.
The session will trow exception.
It's an abominable question.
The zend-session have half year no updated. The ZendFramework is ok?
The text was updated successfully, but these errors were encountered: