]> git.proxmox.com Git - proxmox-widget-toolkit.git/commit
form: display-edit: add safe default renderer for display field
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 31 Jan 2023 16:21:05 +0000 (17:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 31 Jan 2023 16:21:13 +0000 (17:21 +0100)
commit6b70ca845d2328642c9211e528941a4253bb643c
treefe04768c5fa719679838ea39540ce26cae307a96
parent319d450bec6d0ad66f3059fbbf863b3fae856db5
form: display-edit: add safe default renderer for display field

Due to the value binding on can get interesting effects when the
displayEdit field is in write (input) mode, as then the values still
get relayed to the display field, which itself is wanted as the field
supports live-switching, but even though the display field is
disabled and hidden, the value will be still rendered and a user can
XSS themselves inserting things like:
<img src="a" onerror="alert('cookie:'+document.cookie);"></token

And even though it's harmless (your browser knows your own cookie
already), it is rather odd and simply to cheap to harden against (per
default) to not do so.

Reported-by: Marcel Fromkorth <marcel.fromkorth@8com.de>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/form/DisplayEdit.js