Koha-clms/koha-tmpl
Martin Renvoize e99c6d3d62
Bug 42471: (follow-up) prevent XSS in suggestion status
The custom/authorized-value status branch concatenated row.status
directly into a class="..." attribute string. escape_str() only
escapes &, <, > (not quotes), so a status code containing a double
quote could still break out of the attribute.

Build the status <span> via DOM APIs instead, the same way the
reason field was fixed: fixed statuses get a hardcoded class, and
the free-form status code goes into a data-status attribute via
dataset, which the DOM escapes safely regardless of content.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ec92d492576215296bbee42669bcf6ed81c7626)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-08-10 08:18:14 -06:00
..
intranet-tmpl Bug 42471: (follow-up) prevent XSS in suggestion status 2026-08-10 08:18:14 -06:00
opac-tmpl Bug 40610: Update OPAC templates to improve ease of translation 2026-07-13 16:10:35 -06:00