Jump to content

[SOLVED] login cookie question


corillo181

Recommended Posts

i was looking at that code and maybe i'm wrong but if i do it that way, the users are able to modify cookies

so if a user were to modify his cookie with another user name it would log in that user with that user name.

 

so it doesn't look safe. or is this the best way to do it? i wouldn't know I'm going with my instincts here.

Link to comment
Share on other sites

If you want your login system to be secure then you probably shouldn't store anything related to login on the client-side.

Instead handle it server side (MySQL). This makes it almost impossible for there to be a security problem (unless of course someone has directly access to the victim's computer.. in which they are screwed no matter WHAT kind of login system you use).

 

This will basically mean that it will be impossible to steal sessions (or cookies through javascript attacks).

Link to comment
Share on other sites

In another post, someone made a good suggestion.  Store the uid and the users IP address.  If they return from the same IP, then its a safe bet its the same person.  If it's a different IP, then make them re-log back in.

 

Yes it's a hassle for those that are on dial up or other services that change IPs often, but it sure makes it more secure.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.