Files
it-tools/public/visualsubnetcalc
Sebastian DanielssonandClaude Opus 5.5 de40fc7a98 fix(visualsubnetcalc, zpool-calc): escape user data before inserting HTML
Visual Subnet Calculator loads its subnet map from `?c=` shareable links
and imported configs, then wrote subnet keys, notes and colours into the
table HTML unescaped. A crafted link could run script on the it-tools
origin. addRow() now escapes the network, note and ancestor keys in join
cells, and only accepts hex colours. Allocation results, validation
issues, warnings, the network-boundary notice and caught exception
messages are escaped as well.

zpool-calc wrote the vdev type <select> value with .html(); use .text().

Both are vendored files; reapply if they are updated from upstream.

Fixes CodeQL js/xss-through-dom and js/xss-through-exception alerts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:11:50 +02:00
..