Skip to content
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

Improve Remember Me cookie feature and security #180

Merged
merged 5 commits into from
Aug 23, 2013

Conversation

devplanete
Copy link
Contributor

A cookie token can now be used only once.

Cookie hash of user_id & token is now salted with a secret key

@panique
Copy link
Owner

panique commented Aug 22, 2013

Can you please

  1. add a standard domain (so that the script is useable out of the box)
  2. add everything that is necessary to the readme/installing instructions

I've currently no time to check this...

Big thanks!

@devplanete
Copy link
Contributor Author

@panique standard domain added in configuration file and readme/installing instructions updated

@sleggat bug in doLogout() solved, thanks

@panique
Copy link
Owner

panique commented Aug 23, 2013

Looks perfect! Thanks a lot! ;)

panique added a commit that referenced this pull request Aug 23, 2013
Improve Remember Me cookie feature and security
@panique panique merged commit 838774b into panique:develop Aug 23, 2013
@sleggat
Copy link

sleggat commented Sep 10, 2013

@panique Just wondering, is there any plan to allow for multiple cookies, so users can be logged in on more than 1 computer at a time?

@panique
Copy link
Owner

panique commented Sep 10, 2013

I think the user already can be logged in from several computers at the same time (at least in version 4-full). Hm... Okay I just looked at 2-advanced and is another cookies handling built in (this has been done by somebody else) and it's not the same like in 4-full, so i cannot say if this is possible or not (dont have time and nerve to check this).

I'll have a look on this in the end of 2013.

@devplanete
Copy link
Contributor Author

you right @sleggat, it's currently not possible with 2-advanced because each time you use a cookie, a new cookie token is created and replace old one.
It's for security reason: cookie token can be used only once and if someone can retrieve your cookie, it will not be usable anymore...

If you want to disable this security feature and be logged in on more than 1 computer, just comment the call to "$this->newRememberMeCookie();" near the end of "loginWithCookieData()" function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants