Page MenuHomeSoftware Heritage

URLs on moderation dashboard aren't sanitized
Closed, MigratedEdits Locked

Description

The URLs displayed in the Forge URL columns in the datatable are not sanitized currently, and there is no way to access these links without copying and pasting them in the address bar, which can be fixed by using a clickable icon.

Example for another instance of sanitized URLs: https://forge.softwareheritage.org/source/swh-web/browse/master/assets/src/bundles/save/index.js$172

Event Timeline

anirudhlakhotia created this task.
anirudhlakhotia created this object in space S1 Public.
anirudhlakhotia updated the task description. (Show Details)
anlambert added a subscriber: anlambert.

@anirudhlakhotia, sorry but you are wrong here, forge URLs are santized in the moderation dashboard. This is exactly the purpose of the use of the $.fn.dataTable.render.text() render function (see Security doc of datatables).

@anirudhlakhotia, sorry but you are wrong here, forge URLs are santized in the moderation dashboard. This is exactly the purpose of the use of the $.fn.dataTable.render.text() render function (see Security doc of datatables).

Oh
I didn't understand the difference between the inline comment here and this case, could you please explain it?

that comment was written before $.fn.dataTable.render.text() was used

Understood the difference there, I had changed $.fn.dataTable.render.text() to a function returning an <a> tag, hence the security issues.
Thank you!

I was trying to achieve the same results as D7489 for the moderation dashboard essentially, with a clickable icon to open the links in a new tab. Is that still valid?