-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MathML lists #9
base: master
Are you sure you want to change the base?
Conversation
Another more active project does not have all of these mathML elements. |
@gregwebs sorry for the long delay. @fred-wang, could you help me with @gregwebs questions? |
See html5lib/html5lib-python#181 for html5lib and https://code.google.com/p/feedparser/issues/detail?id=433 for feedparser. Kuma has more MathML elements in https://github.com/mozilla/kuma/blob/master/kuma/wiki/constants.py AFAIK, the only MathML features causing problem is "href" (but I assume you are sanitizing the attribute value to remove the Javascript from it). Also, maction@statusline can be used in combination with "href" to hide "evil" links. |
I see Venus and MDN making MathML changes, but html5lib and feedparser have not taken in changes yet. Where does MDN display untrusted tags? |
- MathML elements update based on https://developer.mozilla.org/en-US/docs/Web/MathML/Element - MathML attributes update based on https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
So it looks like my reference of the html5lib sanitizer is stalled. |
@gregwebs Well, I believed I submitted PRs to FeedParser and HTML5Lib a long time ago. The maintainer of the former project reviewed and accepted the changes. But the maintainer of the latter never got any time to check it so I just gave up... You can find the exhaustive list in the HTML5 validator schema (mathml3-common.rnc and mathml3-presentation.rnc are the important parts): Most elements are just presentation tags, the only potential problems I know are #9 (comment) . Maybe Mozilla Security engineer @jruderman can confirm. Of course, if you do not trust others and really want to be sure you should read the MathML recommendation and understand the tags/attributes :-) |
Yeah, The HTML5 validator just tells you what is valid, but it doesn't have anything to do with sanitizing for security? Since I have never used MathML it is really difficult for me to judge the security issues.
Really, this library has a fundamental issue that there is no longer a quality source of safe tags. Any help in finding that source is greatly appreciated. The other approach to be taken here is to have an option to allow all MathML tags. |
Well, it tells you the list of MathML tags / elements but as I said to be sure about their safety, one would have to do the analysis. I'm not aware of such public documentation unfortunately. |
So the best option to maintain security in this library would seem to be to add an option that turns on all MathML |
Address #8.