Jump to content

Session security method


presence

Recommended Posts

I'd like thoughts on how secure the following authentication method is after a login:

A user logs in successfully. Their user id is stored in a php session while their ip address and session id are entered into their user file in the database.  Whenever a user submits or form or tries to do anything important their submitted user id is looked up, and their ip address and session id are compared to the values stored for that user id in the database. If either don't match, the user is kicked back to the login screen.

As near as I can tell, this should be a good and secure method to deal with false user information being entered after login, but I'm just good enough at coding to know how inept I am at coding sensibly. :) So, is this a safe/efficient method?
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.