-
Notifications
You must be signed in to change notification settings - Fork 100
Session validation failed #25
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
Comments
Do you have user agent spoofing (mobile spoofing) active? The session gets validated by user agent |
This is because you have in your config:
Comment out "HttpUserAgent::class" and you will get rid of the error, because there is a bug. Alternatevely use my fix: Module.php
|
Seems like try/catch handler is really required here: zendframework/zendframework#6390 |
Thanks @Mecanik, used your code. Fixed. |
Hi @olegkrivtsov , I'm costumizing Laminas Skeleton and adding link (Fr|En) for translation. When clicking on the link I call an action wich add a variable (containing the selected language) in session and then reload the page to apply changes. The lanaguage variable in session is correctly set but when the page is reloaded it is removed and I do not know Why : Here is my module file :
My Controller and action for switching language here :
I have to say that all my controllers extends the AbstractActionController in where I have added the ServiceManager and Session Manager as construct params. Any help would be really appreciated. |
I recommend you to change language in "onRoute" rather than using session. If you really want to use sessions, there more that you must add/do than what you have. |
Ok. How can I set it into onRoute function without have it in my URL ? Or do you have an example ?
From: Norbert Boros <notifications@github.com>
Sent: lundi 27 avril 2020 20:01
To: olegkrivtsov/using-zf3-book-samples <using-zf3-book-samples@noreply.github.com>
Cc: Samidjo <nanguisamuel@gmail.com>; Comment <comment@noreply.github.com>
Subject: Re: [olegkrivtsov/using-zf3-book-samples] Session validation failed (#25)
I recommend you to change language in "onRoute" rather than using session. If you really want to use sessions, there more that you must add/do than what you have.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#25 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/APLTUCAKZXFFO5BHJ6422KDROXQATANCNFSM4DWDK75Q> . <https://github.com/notifications/beacon/APLTUCGLLP24M3SCT73LVULROXQATA5CNFSM4DWDK752YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET3YS3A.gif>
|
Uh oh!
There was an error while loading. Please reload this page.
(userdemo) when i press F12 in chrome, then refresh the page, it report "Session validation failed" Exception.
The text was updated successfully, but these errors were encountered: