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

Bug #1803564 reported by Natalia Bidart on 2018-11-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
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.

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) on 2018-11-15
Changed in lazr.restful:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Colin Watson (cjwatson)
tags: added: oops
Colin Watson (cjwatson) on 2018-11-15
Changed in lazr.restful:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers