• 
      

    Disallow uploading diffs larger than 1 megabyte.

    Review Request #2984 — Created March 19, 2012 and submitted — Latest diff uploaded

    Information

    Review Board
    release-1.6.x

    Reviewers

    Disallow uploading diffs larger than 1 megabyte.
    
    When diffs are particularly large, they can cause the server to spin at 100% CPU
    for a very long time. This is normally not a problem (who changes that much code
    at a time?), but parent diffs make it easier to hit.
    
    This change fixes it pretty well for the upload forms on the web site.
    post-review will also fail to upload, although the error message it prints out
    is especially bad (it says that the diff file is empty).
    Tested with a local instance. Posted a review with a parent branch of
    release-1.0.x and saw post-review error out.