Repository navigation
restrict SQLFORM.grid view/edit/delete to its own tables - #2647
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2647 +/- ##
==========================================
+ Coverage 50.56% 50.63% +0.07%
==========================================
Files 42 42
Lines 15492 15500 +8
Branches 3405 3409 +4
==========================================
+ Hits 7833 7849 +16
+ Misses 6622 6610 -12
- Partials 1037 1041 +4 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The grid's new/view/edit/delete branches take the target table name from request.args and load db[request.args[-2]] without checking it against the tables the grid was built on. The view action is reachable without a signature for anonymous visitors, so a grid over a public table lets anyone request /f/view/auth_user/1 and read rows of unrelated tables (auth_user email/username and any other readable field, ignoring the grid's own query). This rejects any action whose URL table name is not one of the grid's tablenames, at all four sites.