diff options
| author | Jo-Philipp Wich <jo@mein.io> | 2022-09-21 14:47:41 +0200 |
|---|---|---|
| committer | Jo-Philipp Wich <jo@mein.io> | 2022-09-21 14:50:02 +0200 |
| commit | f25285a6c26e8776f153994704710cb8e51fad91 (patch) | |
| tree | f6fef2505b8d0ba6dc2b7ff8227508b62bcf8587 | |
| parent | 712bc8e52d73720dc42577c08eb80ce7b1548b1e (diff) | |
luci-mod-system: sshkeys.js: prevent XSS through pubkey commentsopenwrt-19.07
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 944b55738e7f9685865d5298248b7fbd7380749e)
| -rw-r--r-- | modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js index 9269a69395..bbb6d050d2 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js @@ -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([], [ |
