mirror of
https://github.com/openwrt/luci
synced 2025-01-07 03:27:12 +08: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:
parent
712bc8e52d
commit
f25285a6c2
@ -109,7 +109,7 @@ function renderKeyItem(pubkey) {
|
||||
click: removeKey,
|
||||
'data-key': pubkey.src
|
||||
}, [
|
||||
E('strong', pubkey.comment || _('Unnamed key')), E('br'),
|
||||
E('strong', [ pubkey.comment || _('Unnamed key') ]), E('br'),
|
||||
E('small', [
|
||||
'%s, %s'.format(pubkey.type, pubkey.curve || _('%d Bit').format(pubkey.bits)),
|
||||
pubkey.options ? E([], [
|
||||
|
Loading…
Reference in New Issue
Block a user