luci-mod-system: fix potential stored XSS

Make sure to escape the key contents in the delete confirmation dialog.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2023-01-13 20:52:17 +01:00
parent 9634086efc
commit 0186d7eae0

View file

@ -204,7 +204,7 @@ function removeKey(ev) {
L.showModal(_('Delete key'), [
E('div', _('Do you really want to delete the following SSH key?')),
E('pre', delkey),
E('pre', [ delkey ]),
E('div', { class: 'right' }, [
E('div', { class: 'btn', click: L.hideModal }, _('Cancel')),
' ',