You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Bug
Text inputs do not make value HTML safe when using .Value. Since there are places where URL parameters are used to populate an input field via .Value (see ConfigPanel.hpp) this is an entry point for arbitrary code execution in the user's browser.
Expected behavior
All the text set via Value should appear in the input. However, text after the quote character does not exist though programmatically accessing the value will give the full string.
Toolchain
OS: Mac
Compiler: Emscripten 1.38.48
Browser: Chrome
Empirical version: master
Possible Fix
We probably need to replace " with " and in general make the string HTML safe.
The text was updated successfully, but these errors were encountered:
lemniscate8
changed the title
Input doesn't render text after " any quote character in string
Text input doesn't render text after any quote " character in string
Jun 30, 2021
I wonder if emp::to_literal() from string_utils.hpp needs to be run on the string to deal with special characters?
lemniscate8
changed the title
Text input doesn't render text after any quote " character in string
Text input doesn't make string HTML safe (can inject code to run on user's browser)
Jul 1, 2021
The Bug
Text inputs do not make value HTML safe when using
.Value
. Since there are places where URL parameters are used to populate an input field via.Value
(seeConfigPanel.hpp
) this is an entry point for arbitrary code execution in the user's browser.To Reproduce
Here's some code:
Expected behavior
All the text set via
Value
should appear in the input. However, text after the quote character does not exist though programmatically accessing the value will give the full string.Toolchain
Possible Fix
We probably need to replace
"
with"
and in general make the string HTML safe.The text was updated successfully, but these errors were encountered: