diff options
| author | Osmium Sorcerer <os@sof.beauty> | 2026-06-03 11:23:33 +0000 |
|---|---|---|
| committer | Osmium Sorcerer <os@sof.beauty> | 2026-06-06 03:09:27 +0000 |
| commit | fd75f3116aa30eb4958cc747f944f202ec69a484 (patch) | |
| tree | 2afb99a17a2fe3c832c8eae0f0e7594ea806b7e9 /webAO/packets/handlers/handlePV.ts | |
| parent | bd8b53cd6046cef9802d593d8257392d81afb5ce (diff) | |
Remove safeTags, decodeChat, and prepChat
Following the removal of innerHTML manipulation, we no longer need these
sanitization functions.
I've reviewed every safeTags call site to make sure the outputs don't
end up anywhere unsafe, and malicious input can't malipulate DOM or
execute code. These values either end up either as plain text
(textContent, innerText, createTextNode, title, option) or as a URL
path to request assets to the server (encoded using encodeURI).
That is, if safeTags was even effective, considering all that function
did was replace '<' and '>' symbols with Unicode lookalikes. Even the
comment was suggesting the use of fundamentally safer functions instead
of these hacks.
Replace remaining uses of prepChat with unescapeChat as we still need
to do the token substitution (like "<and>" to "&"). decodeChat was
escaping Unicode sequences like \uXXXX, but I don't see the reason for
this, AO2 Client doesn't have this feature, and considering WebSocket
text frames are strictly UTF-8, we don't need these encodings.
Diffstat (limited to 'webAO/packets/handlers/handlePV.ts')
0 files changed, 0 insertions, 0 deletions
