#5791: Address errors found by lgtm.com #7403
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.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
I've written a unit test that can be run e.g. like:
Please @mistercrunch as original reporter but feel free to re-assign as you see fit.
The text was updated successfully, but these errors were encountered:
@@ Coverage Diff @@ ## master #7403 +/- ## ========================================== + Coverage 65.71% 65.74% +0.02% ========================================== Files 459 459 Lines 21983 21980 -3 Branches 2415 2413 -2 ========================================== + Hits 14446 14450 +4 + Misses 7416 7410 -6 + Partials 121 120 -1