mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 17:04:35 +04:00
luci-mod-system: sshkeys.js: prevent XSS through pubkey comments
Ensure to not display public key comments verbatim in order to prevent
injection of markup.
Reported-by: Eric McDonald <ericmcdonald@protonmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 944b55738e)
This commit is contained in:
@@ -109,7 +109,7 @@ function renderKeyItem(pubkey) {
|
|||||||
click: removeKey,
|
click: removeKey,
|
||||||
'data-key': pubkey.src
|
'data-key': pubkey.src
|
||||||
}, [
|
}, [
|
||||||
E('strong', pubkey.comment || _('Unnamed key')), E('br'),
|
E('strong', [ pubkey.comment || _('Unnamed key') ]), E('br'),
|
||||||
E('small', [
|
E('small', [
|
||||||
'%s, %s'.format(pubkey.type, pubkey.curve || _('%d Bit').format(pubkey.bits)),
|
'%s, %s'.format(pubkey.type, pubkey.curve || _('%d Bit').format(pubkey.bits)),
|
||||||
pubkey.options ? E([], [
|
pubkey.options ? E([], [
|
||||||
|
|||||||
Reference in New Issue
Block a user