IPerson.createPPA's only accepts a single line description on webservice
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Just saw this error calling createPPA() in lplib:
lazr.restfulcli
Response headers:
---
-content-encoding: gzip
connection: close
content-length: 60
content-type: text/plain;
date: Thu, 15 Dec 2016 06:26:16 GMT
server: zope.server.http (HTTP)
status: 400
strict-
vary: Accept,
x-content-
x-frame-options: SAMEORIGIN
x-launchpad-
x-lazr-
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-xss-protection: 1; mode=block
---
Response body:
---
b'description: https:/
---
Calling .strip() on the string passed to description fixes the issue. Would be nice if LP was more robust against whitespace in submitted values. Either preserving it without exploding, or if it really can't handle it for some reason, stripping it itself rather than exploding.
summary: |
- launchpad explodes when given description with trailing newlines + IPerson.createPPA's only excepts a single line description on webservice |
Changed in launchpad: | |
importance: | Undecided → Low |
summary: |
- IPerson.createPPA's only excepts a single line description on webservice + IPerson.createPPA's only accepts a single line description on webservice |
Changed in launchpad: | |
status: | New → Triaged |
IPerson.createPPA's description field is a TextLine, but it should be Text.
Ideally it would use copy_field, but registry shouldn't import soyuz.