Page MenuHomeSoftware Heritage

API: add HTML escapes in displayed data
Closed, MigratedEdits Locked

Description

When accessing, for instance, a revision in the web API, the JSON data is not escaped.

Example : author -> fullname in https://archive.softwareheritage.org/api/1/revision/18d8be353ed3480476f032475e7c233eff7371d5/

This makes us vulnerable to code injections and should be fixed throughout the API views.

Event Timeline

olasd added a project: Restricted Project.
olasd moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

For the record, the problem with the specific example is that the actual JSON (which is partly hidden if you look at it via browser), reads:

"author": {
    "email": "robot@softwareheritage.org",
    "fullname": "Software Heritage <robot@softwareheritage.org>",
    "id": 3661419,
    "name": "Software Heritage"
},
zack raised the priority of this task from Normal to High.Jan 24 2017, 10:22 AM