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

Add access grant check on backend side. #4346

Merged

Conversation

corentin-soriano
Copy link
Contributor

@corentin-soriano corentin-soriano commented Sep 20, 2024

There are currently places in php where access grants on items are not properly checked.
A malicious user can edit the request before sending it to the server or edit the DOM with the debug console to bypass restrictions.

Now:

  • User can't move item from ND folder (as it removes item from source folder).
  • User can't move item on any folder without W access (ex: personal folder of an other user).
  • User can't remove item in ND folder by removing hidden class on .form-item-delete.

Using the code from check_current_access_rights query to create function getCurrentAccessRights().
Returns true instead of null which was confusing.

@corentin-soriano corentin-soriano marked this pull request as ready for review September 20, 2024 13:13
@corentin-soriano corentin-soriano changed the title WIP - Add access grant check on backend side. Add access grant check on backend side. Sep 20, 2024
@nilsteampassnet nilsteampassnet merged commit 753d8d3 into nilsteampassnet:master Sep 20, 2024
2 of 3 checks passed
nilsteampassnet added a commit that referenced this pull request Sep 20, 2024
Merged PR #4346, #4344
@corentin-soriano corentin-soriano deleted the access_grant_backend branch September 24, 2024 06:16
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