Avoid triggering Object.prototype.__proto__ with keys (#2251)

This way, the diff algorithm works with untrusted keys.
This commit is contained in:
Isiah Meadows 2018-10-15 15:09:55 -04:00 committed by GitHub
parent d2ca44b693
commit 88b17c1c60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View file

@ -521,7 +521,7 @@ module.exports = function($window) {
}
}
function getKeyMap(vnodes, start, end) {
var map = {}
var map = Object.create(null)
for (; start < end; start++) {
var vnode = vnodes[start]
if (vnode != null) {