-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony: Add authorization constraints on entities #67
Comments
Why would you want to do that @malkusch ? |
Sorry, I was not clear enough. I updated the description above to be more clear about the issue. |
Oh I see, thanks for reporting this, I will make the necessary changes. |
The easy solution is to find an entity based on two params: entity id + user id. So nothing is found if an entity is requested by not an owner. |
@komarserjio Now that you mention it, is NotesController::create() protected against a post request with a pad id from another user's pad? |
Good point. No, there is no protection from another user's pad. |
Currently users can view, edit and delete entities of other users:
Deleting the pad doesn't work, but unfortunately deleting the note of another user does.
The authenticated user should be checked against the owner of entities.
The text was updated successfully, but these errors were encountered: