showing the key itself is not initially bad, because it makes no real sense, but showing the means to gain access to the element is bad.
for example, you have an online store that sold items from 2 merchants. Merchant A had items (1, 3, 5, 7), and Merchant B had items (2, 4, 5, 8).
If I shop at Merchant A and see: http: //server/viewitem.aspx? Id = 1
Then I could try playing with him and type: http: //server/viewitem.aspx? Id = 2
This may allow me to access an item that I should not access, as I shop with Merchant A, not B. In general, allowing users to bother with such things can lead to security issues. Another brief example are employees who can view their personal information (id = 382), but they enter the identifier of another user to go directly to another profile.
Now, saying that it’s not bad if security checks are built into the system that check that people do what they should (for example: do not make purchases from another merchant or do not view another employee).
One mechanism is to store information in sessions, but some do not like it. I am not a programmer, so I won’t go into it.
The main thing is that the system is safe. Never trust the data received from the user.
source share