-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c13945
commit c9ce261
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c9ce261
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this added encryption step adds to the security of cookies except size?
Also it's missing a fallback to the previous encryption so all previously encrypted cookies are lost on upgrade..
Personally reverting to the old logic in my middleware, I see 0 benefit to this
c9ce261
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this provides additional security, not related to output size.
c9ce261
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it? The value is already encrypted with a salt.. This doesn't add much security but does increase the size of the cookie quite a lot (150% approx)
I guess maybe in the sense that it prevents you from using any laravel encrypted string in a cookie so you can't just swap the name of a cookie maybe it does a bit
But seriously the authentication cookie is now 2Kb (2092Chars) which is half of the default limit this is way too much something needs to be done about this
With session and XSRF token the total cookie size of laravel is 3Kb this is way too close to the limit and prevents us from adding other encrypted cookies