Replies: 4 comments 3 replies
-
If it is deemed safe, then I suggest we either remove the censorship or provide a lockdown option for disabling the censorship |
Beta Was this translation helpful? Give feedback.
-
My understanding is that HTML comments are not a normative feature of JS and so a program with an apparent HTML comment may behave differently in one JS engine than another, so to audit a program that might be used in multiple JS engines, you have to consider the behavior with and without interpretation of HTML comments, and that creates an attack vector. The attack would not constitute an escape, but difference in behavior. The argument for Because neither of these is an escape of confinement, I am sympathetic to introducing a Summoning @erights to check my work. |
Beta Was this translation helpful? Give feedback.
-
I thought that html-like comment behavior had been standardized at some point. Is this not the case?
sounds like this is markm's preferred approach |
Beta Was this translation helpful? Give feedback.
-
Yes. For non-browsers for evaluable scripts, it is effectively "normative optional", meaning that it is optional, but if some engine does it, it must do it according to the standard. IIRC, evaluable scripts on v8 and therefore Node do recognize html-like comments. XS does not. What is not optional: for module code, html-like comments must not be recognized. Rather than enable attacks on scripts do to the differences between Node and XS for example, we choose to disallow anything that looks like an html-like comment to prevent this exploitable ambiguity from arising. So in answer to the OP question:
|
Beta Was this translation helpful? Give feedback.
-
My understanding as to why html comments are censored is because they are confusing to the user, but not that they can't be confined. Is this correct?
The censorship causes compatibility issues, especially because our detection is unable to distinguish from the
-->
pattern appearing in valid code, strings, and js comments.relevant issues:
#1217
#1837
Beta Was this translation helpful? Give feedback.
All reactions