Add bulletproofing to the bug views.

Review Request #12751 — Created Dec. 7, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

We're hitting some crashes on the demo server from bots accessing the
bug redirect view for a review request that does not have an associated
repository. This view made an assumption that the repository exists,
which is generally fine for normal usage but fails when crawlers try to
be clever.

This change adds some bulletproofing to the bug-related views to
validate that the repository exists and return a 404 if it doesn't.

Ran unit tests.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add bulletproofing to the bug views.
We're hitting some crashes on the demo server from bots accessing the bug redirect view for a review request that does not have an associated repository. This view made an assumption that the repository exists, which is generally fine for normal usage but fails when crawlers try to be clever. This change adds some bulletproofing to the bug-related views to validate that the repository exists and return a 404 if it doesn't. Testing Done: Ran unit tests.
765d4880c58dc4280528ca6ffdf97fcc8e4148d4 David Trowbridge
reviewboard/reviews/views.py
reviewboard/reviews/tests/test_bug_infoxbox.py
reviewboard/reviews/tests/test_bug_url_redirect_view.py
Loading...