Reputation: 1363
PROBLEM
If the logged user knows the id of items that belong to some other user, he can access to it. I would like to prevent this behavior.
SOLUTION
The first solution I found is to add a userid field to every records in every table to check at every query if the record belong to the logged user.
This is a good solution? Do you know some better design pattern to prevent the user to access other users' data?
Thanks
Upvotes: 1
Views: 1058
Reputation: 4078
Upvotes: 1