Hi guys!
I'm trying to create a login required website right now. I also need to use cookies instead of Session as well.
I made it so that the cookies will hold the unique ID and the user's name.
The other pages will then check if the cookie exists and then pulls out the rid and use that to pull out information regarding the user in the database.
My question is...what stops other people from creating that same cookie with vccc.com and putting any random rid in there and be able to access a random person's account?
What can I do to secure this? Should I create a Session ID # and put it in the cookie and put a copy in the table and see if it matches?
Thanka mery much.
I'm trying to create a login required website right now. I also need to use cookies instead of Session as well.
I made it so that the cookies will hold the unique ID and the user's name.
Code:
Response.Cookies("vccc.com")("rid") = rid
Response.Cookies("vccc.com")("opName") = opName
Response.Cookies("vccc.com").expires = Date() + 1
The other pages will then check if the cookie exists and then pulls out the rid and use that to pull out information regarding the user in the database.
My question is...what stops other people from creating that same cookie with vccc.com and putting any random rid in there and be able to access a random person's account?
What can I do to secure this? Should I create a Session ID # and put it in the cookie and put a copy in the table and see if it matches?
Thanka mery much.