-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
5.6.31 : Exception after upgrade (encrypted cookie related) #25160
Comments
Did the cookie already exist before the upgrade? |
For all already logged users, yes |
a2c54e6...c5dc9c8, affecting 5.5.42 as well, see octobercms/october#3681 (probably same issue) |
From https://laravel.com/docs/5.6/upgrade#upgrade-5.6.30
But it's not invalidating them... |
What session provider are you using? I'm trying to reproduce this, but the invalidation of legacy cookies works for me. When Laravel decrypts my session cookie, it receives the serialized session id (e.g. Somehow, your application receives the serialized user id from the session. It then fails because PostgreSQL is strict about data types. MySQL would just return an empty query result. |
@staudenmeir I'm using the |
Are you using encrypted sessions ( |
No |
Do you have a legacy cookie you can use for debugging? |
@staudenmeir, yes I do
|
Does updating to |
@staudenmeir yes, it does, thanks ! |
This is definitely still a problem in 5.5.42 and the one workaround I've found for it, setting |
Still happening here too @staudenmeir (v5.5.42) @jjanusch which middleware? then I'll use that workaround too as a quick fix |
@Jaspur It's mentioned in https://laravel.com/docs/5.5/upgrade under "Configuring Cookie Serialization". That's the fix that was implemented by OctoberCMS and it seems to have worked well there (though I believe they use MySQL by default). In my case, my project using Postgres didn't got a completely different error when I applied that change. I ended up downgrading back to 5.5.40 for the time being and leaving my production projects as-is because it is unreasonable to ask all users to clear their cookies, especially when the site throws an error and I am unable to display anything to the user anyway |
Just upgraded to 5.5.42 and all existing sessions throwing 404s until you clear the cookies manually. Caused by "invalid input syntax for integer: "s:123:"1"" expections related to the sessions and PostgreSQL. Seems like old sessions don't get invalidated automatically to me. Manually clearing the session cache and renaming the session cookie didn't help either. It might be related to the "remember me" cookie, maybe? |
I have the same error using Laravel 5.5.42 and PostgreSQL. I've tried to downgrade to an old version as @jjanusch suggested but I got another error if users where using the new generated cookie. In my case is definitely related with the remember me cookie. I've done a ugly hack that removes that cookie. It's not really a solution but now the users can use the page after the first error. I use this code inside a middleware:
|
This will be fixed in the next release: #25301 |
Laravel 5.5.43 has been released. |
Description:
After upgrade to 5.6.31, I receive the following exception
Steps To Reproduce:
The error is thrown from a blade template from
@auth
As a workaround I surrounded the call
on
Illuminate\Auth\EloquentUserProvider.php
line 66 with a try/catchThe text was updated successfully, but these errors were encountered: