Revealing User ids

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
PaxBritannia
Posts: 680
Joined: Sun Apr 18, 2010 1:54 pm

Revealing User ids

Post by PaxBritannia »

Previously, I though of having both a "user id" and a "public user id". The public user id is essentially the user id hashed with a salt.

The idea was so that when I included the "public" user id in a get or post, the actual user id used to make database changes would not be disclosed.

Theoretically it should be safer, but is it actually needed assuming that the database is secure? If the database was not secure, someone with access to it could just search the public userid.

So it is redundant or not? And to what degree is revealing the user id a security threat?

ita Stet.
User avatar
kaos78414
Posts: 507
Joined: Thu Jul 22, 2010 5:36 am

Re: Revealing User ids

Post by kaos78414 »

What exactly are you trying to make more secure?

I don't think exposing a user id is really much of a threat, unless you are blindly accepting post and get data without any validation. If you have a function that deletes a user for example, and it is executed by going to the URL at: site.com/user/[user_id]/delete_user/, you should be matching the user id with the session to make sure that the user that is logged in is the one trying to perform that action. So, I would just say that you should be making sure that you validate data correctly and you should be okay.
w00t
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Revealing User ids

Post by Jackolantern »

Without knowing the full situation/structure you are working with, I would agree with Kaos. You don't have to keep every bit of data out of the hands of your users. Provided you are taking lots of precautions with the other segments in your application, you should be fine.
The indelible lord of tl;dr
Post Reply

Return to “General Development”