Store returns snap metadata containing carriage return characters

Bug #1717830 reported by Robert Ancell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store Server
Fix Released
Undecided
Matias Bordese

Bug Description

While investigating bug 1702539 in GNOME Software I found that snapd was returning '\r\n' for line endings for some snap descriptions (the rest were just '\n'). Prompting the store shows these appear to be coming from there:

$ http --json https://api.snapcraft.io/api/v1/snaps/details/hiri X-Ubuntu-Series:16 fields==description
HTTP/1.1 200 OK
Content-Length: 397
Content-Type: application/json
Date: Thu, 14 Sep 2017 08:39:05 GMT
Server: gunicorn/19.7.1
X-Request-Id: 8396f777-47bb-4d25-941b-f868d1b04f2a
X-VCS-Revision: 5f3da77

{
    "description": "Hiri is an email client for Office 365 / Exchange / outlook.com / msn.com / hotmail.com / live.com. Basically all the Microsoft Email services :)\r\n\r\nHiri has full email, calendar and tasks functionality.\r\n\r\nHiri is a subscription service but you do have 14 days free to try it to see if you like it. \r\n\r\nVisit www.hiri.com for more information.",
    "package_name": "hiri"
}

When discussing on the forum [1] it was suggested that these might have come from the store HTML form input.

Regardless of the source, it would be ideal to standardise the newline character, and I propose to use '\n'. This might require the store to filter input to extract the carriage returns.

[1] https://forum.snapcraft.io/t/snap-metadata-newline-characters/2116

Matias Bordese (matiasb)
Changed in snapstore:
status: New → Fix Committed
Bret Barker (noise)
Changed in snapstore:
assignee: nobody → Matias Bordese (matiasb)
Matias Bordese (matiasb)
Changed in snapstore:
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.