Add bulletproofing to the bug views.
Review Request #12751 — Created Dec. 7, 2022 and submitted
Information | |
---|---|
david | |
Review Board | |
release-5.0.x | |
Reviewers | |
reviewboard | |
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.
Change Summary:
Add unit tests to validate new behavior.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+88 -4) |
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
-
-
Typo in the filename:
infoxbox
->infobox
.To be consistent, though, let's use
infobox_view
in the name. -
reviewboard/reviews/tests/test_bug_infoxbox.py (Diff revision 2) Would be more accurate as
BugInfoboxViewTests
.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+88 -4) |
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.