Add bulletproofing to the bug views.

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

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.

Summary ID
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.
cc7ef5c0c7a39caa416903b79b4f6ab33b3b2f92
Description From Last Updated

Looks fine, but can you add unit tests so we have coverage here?

chipx86chipx86

Typo in the filename: infoxbox -> infobox. To be consistent, though, let's use infobox_view in the name.

chipx86chipx86

Would be more accurate as BugInfoboxViewTests.

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    Looks fine, but can you add unit tests so we have coverage here?

  3. 
      
david
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    Typo in the filename: infoxbox -> infobox.

    To be consistent, though, let's use infobox_view in the name.

    1. Perhaps we should introduce foxboxes.

  3. Show all issues

    Would be more accurate as BugInfoboxViewTests.

  4. 
      
david
maubin
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (cfcd0dc)