libreoffice-online/browser/html
Skyler Grey 81497efd55 Replace innerHTML with innerText
Previously we were using innerHTML to insert user-generated content
(usernames) into the document. While we were sanitizing these correctly,
it was hard to tell that we were and required a level of knowledge about
what was kept where (e.g. were we getting the usernames from the
sanitized cache or from an unsanitized event?)

By replacing innerHTML with innerText, this commit removes the risk of
someone making a mistake like using the wrong variable and introducing
XSS. It also makes the code more obviously secure

Unfortunately, w2overlay doesn't support using any property that is not
"html" to provide a message, so we can't directly use innerText. For now
I'll move the sanitization process directly above where we set the
message to make it obvious, but for this reason (and typescript) we
should consider replacing w2overlay in the near future

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: If935dc2d765dd5e345ce760cad88386ea98d97b4
2024-02-28 16:07:22 +01:00
..
cool-help.html Refactor show/hide section code 2024-02-23 09:57:56 +01:00
cool.html.m4 Replace innerHTML with innerText 2024-02-28 16:07:22 +01:00
debug.html
framed.doc.html framed.doc: Added postmessage for Get_User_State 2024-01-03 15:55:37 +01:00
framed.html
load.doc.html
multidocs.html
wasm.html browser: add wasm.html to load documents via wasm 2023-10-24 21:33:02 -04:00