Projektstart
This commit is contained in:
16
backend/node_modules/fast-json-stringify/test/sanitize5.test.js
generated
vendored
Normal file
16
backend/node_modules/fast-json-stringify/test/sanitize5.test.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict'
|
||||
|
||||
const t = require('tap')
|
||||
const build = require('..')
|
||||
|
||||
const payload = '(throw "pwoned")'
|
||||
|
||||
const expected = 'Error: Invalid regular expression: /*/: Nothing to repeat. Found at * matching {"type":"*/(throw \\"pwoned\\")){//"}'
|
||||
|
||||
t.throws(() => {
|
||||
build({
|
||||
patternProperties: {
|
||||
'*': { type: `*/${payload}){//` }
|
||||
}
|
||||
})
|
||||
}, expected)
|
||||
Reference in New Issue
Block a user