mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-02 05:05:12 +09:00
scrub() walked element children only, so comments, processing instructions and CDATA passed through. They survive XML serialization but close early when React re-parses the string as HTML (<!-->, <?x >), so a registry or plugin icon could smuggle out an <img onerror> and run script with the tokens in localStorage. Keep only allowed elements and text; a browser regression runs eight bypass payloads in CI.