Projektstart
This commit is contained in:
14
backend/node_modules/fast-json-stringify/test/sanitize4.test.js
generated
vendored
Normal file
14
backend/node_modules/fast-json-stringify/test/sanitize4.test.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
const t = require('tap')
|
||||
const build = require('..')
|
||||
|
||||
const payload = '(throw "pwoned")'
|
||||
|
||||
const stringify = build({
|
||||
required: [`"];${payload}//`]
|
||||
})
|
||||
|
||||
t.throws(() => {
|
||||
stringify({})
|
||||
}, 'Error: ""];(throw "pwoned")//" is required!')
|
||||
Reference in New Issue
Block a user