when a user urls hacks we can get InvalidBatchSize oopses

Bug #730393 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Unassigned

Bug Description

While InvalidBatchSize oopses are valuable if our form machinery ever gets out of sync with backend limits, a user hacking urls shouldn't trigger an oops.

  1 InvalidBatchSizeError: Maximum for "batch" parameter is 50.
   GET: 1 Robots: 0 Local: 0
      1 https://translations.launchpad.net/ubuntu/natty/+source/compiz/+pots/compiz/gl/+translate (POFile:+translate)
       OOPS-1891L2140

What we should do is look at the referer: if its not from lp (or affiliated sites per our 404 heuristics) just give them an error (e,g, 'invalid batch size') and not log an oops.

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

Or perhaps just clamp the batch size and ignore the invalidity.

Curtis Hovey (sinzui)
tags: added: trivial
Revision history for this message
Curtis Hovey (sinzui) wrote :

Reading InvalidBatchSizeView in lp/canonical/launchpad/webapp/error.py, I believe it defines isSystemError() as False and should not be reporting oopses. Did I misread what isSystemError() does?

I know that NotFoundErrors are not logged when there is a referer, but I do not see how Lp suppresses it. I think we want to NotFoundErrors and InvalidBatchSize to operate the same way. Maybe even share code.

Curtis Hovey (sinzui)
Changed in launchpad:
assignee: nobody → Curtis Hovey (sinzui)
milestone: none → 11.06
milestone: 11.06 → none
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.