-
Notifications
You must be signed in to change notification settings - Fork 788
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
[3.x][security improvement] make PHP sessions more secure #186
Comments
I'd disagree with regenerating the session id on each request. I only do it on login/logout. |
I personally would use these settings in addition to the ones you mentioned:
|
Would be cool if somebody could implement (and test) this into the new https://github.com/panique/php-login-advanced and the new 4-full-mvc which is now in the develop of THIS repo. Seems to be a cool feature, but could also be a massive security hole if wrongly implemented. Currently I don't have the time to do this :( |
Moved this to 3.0 |
This feature has now been implemented (in develop and master branch), but a new session id is only created at some security-critical points inside the application. Please have a look into #693 to some really information and for sure the merged code. |
I have find interesting information on session_start on this link http://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL#Create_PHP_Functions
It seems that session_start() is not enough to really have a "safe" session well protected agains XSS attack and session hijacking.
The article propose to replace session_start by the secure_session_start below.
This function makes your login script a whole lot more secure. It stops hackers been able to access the session id cookie through javascript (For example in an XSS attack).
Also by using the "session_regenerate_id()" function, which regenerates the session id on every page reload, helping prevent session hijacking.
Looks nice?
The text was updated successfully, but these errors were encountered: