Skip to content
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

Fix missing permission checks when accessing or deleting notes and no… #109

Closed
wants to merge 1 commit into from

Conversation

trurli
Copy link
Collaborator

@trurli trurli commented Apr 14, 2018

…tebooks.

There were no checks to make sure that a user can only access or delete their own notes / notebooks. Notes of other users can be accessed or deleted by simple URL rewriting (e.g. by tunneling through a proxy). This is especially easy because the notes' and notebooks' IDs are enumerable and therefore can be guessed by decrementing / incrementing a known ID.

I made sure to always pass the current user's ID when looking up notes and notebooks from the DB. I'm sure this has to be converted into something more sophisticated once sharing is in, depending on the implementation, but for now it should prevent illegal access.

@brantje
Copy link
Owner

brantje commented Apr 14, 2018

This will be implemented together with #81.
I've already implemented this in my local branch, and get merge conflicts (doh).
Hence reason for closing it.

@brantje brantje closed this Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants