Make admin activity widget date range parsing a little bit more robust.

Review Request #5101 — Created Dec. 11, 2013 and submitted

Information

Review Board
release-1.7.x

Reviewers

Make admin activity widget date range parsing a little bit more robust.

It was possible to cause the activity widget in the admin to generate requests
to the server that would generate a 500 response. The issue here was that we
didn't properly sanitize dates unless both the start and end range were
provided.

I've changed it to convert the request parameters to datetimes individually
instead of if they're both necessary, and changed the if/elif/etc block to
verify that the necessary data was provided in request.GET before trying to use
it.

Checked out the admin UI a bit.

Description From Last Updated

Can you add a blank line before this, so it doesn't look like it's part of the prior if block?

chipx86chipx86
chipx86
  1. 
      
  2. reviewboard/admin/widgets.py (Diff revision 1)
     
     
    Show all issues

    Can you add a blank line before this, so it doesn't look like it's part of the prior if block?

    1. I thought the whole point of whitespace was to delineate blocks :P

      I'll make the change...

    2. Those are separate blocks. One is handling range_end, one range_start. Clumped together, it looks closer to an if/elif

  3. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.7.x (ca69dfd).
Loading...