Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .yarn/releases/yarn-1.15.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -128943,6 +128943,12 @@ THE SOFTWARE.
if (!match) return
if (match[1] !== undefined) {
section = unsafe(match[1])
if (section === '__proto__') {
// not allowed
// keep parsing the section, but don't attach it.
p = {}
return
}
p = out[section] = out[section] || {}
return
}
Expand All @@ -128958,6 +128964,7 @@ THE SOFTWARE.
// Convert keys with '[]' suffix to an array
if (key.length > 2 && key.slice(-2) === '[]') {
key = key.substring(0, key.length - 2)
if (key === '__proto__') return
if (!p[key]) {
p[key] = []
} else if (!Array.isArray(p[key])) {
Expand Down Expand Up @@ -128988,6 +128995,7 @@ THE SOFTWARE.
var l = parts.pop()
var nl = l.replace(/\\\./g, '.')
parts.forEach(function(part, _, __) {
if (part === '__proto__') return
if (!p[part] || typeof p[part] !== 'object') p[part] = {}
p = p[part]
})
Expand Down