A Conversation for Website Developer's Forum
- 1
- 2
Implementing User cookies
Frankie Roberto Posted Feb 22, 2003
You wouldn't automatically be logged in in a scond broswer, you have to log in again with username/password. BUT logging in on a second browser wouldn't invalidate your cookie on the first browser. Logging out of the second browser WOULD invalidate your cookie on the first browser though. I dunno if that makes sense...
Implementing User cookies
Ion the Naysayer Posted Feb 22, 2003
I think d'Elaphant is right about tracking IP addresses. Anyone that gets ahold of the cookie could fake their identity to the script. If you check it against the IP address you could be (relatively) sure that it came from the same computer.
You might also want to think about making sessions timeout to prevent the cookie from being used hours after the real person has logged out. You can't rely on cookies to delete themselves, either - the session id would have to time out on the server end.
Implementing User cookies
Pastey Posted Feb 22, 2003
As I'm sure you know it's possible to spoof IP addresses too, really it all comes down to how much you trust your users, or the people with access to their machines.
Implementing User cookies
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Feb 22, 2003
Bit of a shame, but I like the IP address idea, even tho' you can rout and fake IP addresses, you'd need someone with expert level of computer competences to do it.
-- DoctorMO --
Implementing User cookies
Ion the Naysayer Posted Feb 23, 2003
Someone with an expert level of computer competence... Or any idiot with a NAT box...
It's not secure but it helps. Nothing is completely secure, after all.
Implementing User cookies
Frankie Roberto Posted Feb 23, 2003
Can't be bothered with IP stuff. and cookies wont time-out because I want people to be able to login from their home computer and never have to login again. If they're using a public computer and don't logout it's their fault...
Implementing User cookies
Ion the Naysayer Posted Feb 23, 2003
*nod* Understandable.
Given that then, I would recommend that the logout command delete the sessionid from the database rather than just deleting the cookie on the user end. It's no more effort to implement and much more secure.
Implementing User cookies
Frankie Roberto Posted Feb 23, 2003
Yeah, that's pretty much how it works at the mo.
What's the difference usually between people clicking 'remember me' or not...?
Implementing User cookies
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Feb 24, 2003
if you close the browser the cookies are lost, but if the database still has an entry on that sesion then the database may become overcrowded, so you'll have to have some clean up functions and a max time out of sesions that haven't been used...
-- DoctorMO --
Implementing User cookies
Frankie Roberto Posted Feb 24, 2003
I don't get you. If the browser is closed without logging out, then the session id remains next to the users entry in the database. Which means if they re-open the browser with the cookie still there, then they won't need to login.
If I missed the point, can you explain again?
Implementing User cookies
Ion the Naysayer Posted Feb 25, 2003
Closing the browser only deletes session cookies, DoctorMO... Most cookies are persistent rather than session.
Implementing User cookies
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Mar 3, 2003
Only if you chose so, and only if you wish this to be the case,
Using my name like that, tut tut...
-- DoctorMO --
Key: Complain about this post
- 1
- 2
Implementing User cookies
- 21: Frankie Roberto (Feb 22, 2003)
- 22: Ion the Naysayer (Feb 22, 2003)
- 23: Pastey (Feb 22, 2003)
- 24: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Feb 22, 2003)
- 25: Ion the Naysayer (Feb 23, 2003)
- 26: Frankie Roberto (Feb 23, 2003)
- 27: Ion the Naysayer (Feb 23, 2003)
- 28: Frankie Roberto (Feb 23, 2003)
- 29: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Feb 24, 2003)
- 30: Frankie Roberto (Feb 24, 2003)
- 31: Ion the Naysayer (Feb 25, 2003)
- 32: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Mar 3, 2003)
More Conversations for Website Developer's Forum
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."