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>
(cherry picked from commit 0186d7eae0e123a409e9919a83fdfecc7945c984)
This commit is contained in:
Jo-Philipp Wich 2023-01-13 20:52:17 +01:00
parent d548d858c8
commit aa7938d4cb

View File

@ -198,7 +198,7 @@ function removeKey(ev) {
L.showModal(_('Delete key'), [ L.showModal(_('Delete key'), [
E('div', _('Do you really want to delete the following SSH 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: 'right' }, [
E('div', { class: 'btn', click: L.hideModal }, _('Cancel')), E('div', { class: 'btn', click: L.hideModal }, _('Cancel')),
' ', ' ',