OOPS when submitting a comment on an MP with a single newline

Bug #1803564 reported by Natalia Bidart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Fix Released
Critical
Colin Watson

Bug Description

I was trying to submit some inline comments on an MP and by some random coincidence there was a single newline in the global comment textarea. When clicking "Save" I got the following:

"Server error, please contact an administrator. OOPS ID:OOPS-875bdd9cf06e4ca361b115bc46c5f6c9"

The oops' traceback:

  IndexError: list index out of range

    Traceback (most recent call last):
  Module zope.publisher.publish, line 132, in publish
    result = publication.callObject(request, obj)
  Module lazr.restful.publisher, line 211, in callObject
    WebServicePublicationMixin, self).callObject(request, object)
  Module lp.services.webapp.publication, line 463, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  Module zope.publisher.publish, line 107, in mapply
    return debug_call(obj, args)
   - __traceback_info__: <security proxied lazr.restful._resource.EntryResource instance at 0x7fd49f7a3550>
  Module zope.publisher.publish, line 113, in debug_call
    return obj(*args)
  Module lazr.restful._resource, line 922, in __call__
    result = self.do_POST()
  Module lazr.restful._resource, line 754, in do_POST
    return self.handleCustomPOST(operation_name)
  Module lazr.restful._resource, line 1394, in handleCustomPOST
    value = super(EntryResource, self).handleCustomPOST(operation_name)
  Module lazr.restful._resource, line 738, in handleCustomPOST
    return operation()
  Module lazr.restful._operation, line 73, in __call__
    values, errors = self.validate()
  Module lazr.restful._operation, line 192, in validate
    self.request.form.get(name))
  Module lazr.restful.marshallers, line 170, in marshall_from_request
    value = v[0]
IndexError: list index out of range

As per Colin debugging, this is related to a workaround LP has for https://code.google.com/archive/p/simplejson/issues/43 that is likely now already fixed upstream, so it could be removed.

Tags: oops

Related branches

summary: - OOPS when submitting a "global" comment with a single newline
+ OOPS when submitting a comment with a single newline
summary: - OOPS when submitting a comment with a single newline
+ OOPS when submitting a comment on an MP with a single newline
Colin Watson (cjwatson)
Changed in lazr.restful:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Colin Watson (cjwatson)
tags: added: oops
Colin Watson (cjwatson)
Changed in lazr.restful:
status: In Progress → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

Fixed in lazr.restful 0.21.0, now deployed on Launchpad production.

Changed in lazr.restful:
status: Fix Committed → Fix Released
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.