security fix
This commit is contained in:
parent
91ece18d2b
commit
08f1dcdaba
1 changed files with 4 additions and 0 deletions
|
@ -121,6 +121,10 @@ Pattern.prototype.draft = function () {
|
|||
}
|
||||
|
||||
Pattern.prototype.createPartForSet = function (partName, set = 0) {
|
||||
// gotta protect against attacks
|
||||
if (typeof set === '__proto__') {
|
||||
throw new Error('malicious attempt at altering Object.prototype. Stopping action')
|
||||
}
|
||||
// Create parts
|
||||
this.setStores[set].log.debug(`📦 Creating part \`${partName}\` (set ${set})`)
|
||||
this.parts[set][partName] = this.__createPartWithContext(partName, set)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue