mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 22:02:38 +03:00
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>