-
Notifications
You must be signed in to change notification settings - Fork 605
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
use Object.create(null) to create all parsed objects #603
Conversation
This PR is even more important to merge because it Closes #663. |
@Leonidas-from-XIV What do you think? This PR will fix the exploit reported against the latest version. |
I am sort of wondering if this needs to be a breaking change? I could imagine just checking for |
Actually, scratch that, you can inject shenanigans like |
Prevent parsing of documents containing tags or attributes named
__proto__
from overwriting the prototype on returned objects (See #593)This is a breaking change, and will break any users of this library which use, for example
.hasOwnProperty
on the returned objects. (The tests here have been updated to avoid this).