I need a absolutely secure login system.
(About a month ago, I commented on the secure login system presented on this site stating that this one would not be 100% secure. Reasoning is repeated below)
Plz help me think about this one...
user needs to be able to stay logged in if active enough (let's say, transaction every 5 minutes)
if inactive, log user out.
I use the following method:
login, get a session id (unique normal timestamp-id, see function in manual), stored in a cookie. insert data about session in table (session id, login time, ip address, user id).
On every pageload, I check the cookie-value of the userid against the value in the table, check whether the login time isn't more than 5 minutes ago and if the ip-address is the same.
Only if you have a match, you are allowed to see the page.
Does this seem 100% secure?
Does anybody see ANY way of cheeting?
Thx for your cooperation !
-- why the secure system on this site seems insecure --
using 2 cookies, it's quite easy (it seems) to copy those two cookies from somebody's computer and use them for your own purposes. One can spoof them on the net or just copy them (I program this site for public terminals) to a disk. Changing (it's only a textfile?) the expire-time would even make it possible to keep on using the cookie for ever... login in as being somebody else.
Am I wrong? I admit, it's pretty secure, but not the 100% I'm looking for, is it?