sturmer opened a new pull request #7403: [WIP] #5791: Return 404 when 
requesting access to unexisting dashboard ID
URL: https://github.com/apache/incubator-superset/pull/7403
 
 
   ### CATEGORY
   
   Choose one
   
   - [ ] Bug Fix
   - [x] Enhancement (new features, refinement)
   - [ ] Refactor
   - [x] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   The website LGTM.com has detected a few errors from static analysis. This 
patch contains a possible fix for the first of them ("URL redirection from 
remote source") that follows the website's own recommendation: Check the input 
against some known source before using it. I've checked that the dashboard ID 
provided actually exists in DB and if it doesn't I return a 404.
   I plan to solve the other 4 issues labeled as "Error" but wanted to get some 
early feedback before moving on.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Not applicable.
   
   ### TEST PLAN
   I've written a unit test that can be run e.g. like:
   `tox -e py37 -- 
tests/access_tests.py:RequestAccessTests.test_dashboard_endpoint_malicious_redirect`
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: #5791 
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   Please @mistercrunch as original reporter but feel free to re-assign as you 
see fit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to