Skip to content

Commit

Permalink
Merge pull request #180 from ChALkeR/chalker/fix-style
Browse files Browse the repository at this point in the history
Fix a ReDoS in 'style' format
  • Loading branch information
LinusU authored Jun 29, 2020
2 parents 9df4acb + ccde29d commit 22c6b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports['hostname'] = function (input) {
}
exports['alpha'] = /^[a-zA-Z]+$/
exports['alphanumeric'] = /^[a-zA-Z0-9]+$/
exports['style'] = /\s*(.+?):\s*([^;]+);?/g
exports['style'] = /.:\s*[^;]/g
exports['phone'] = function (input) {
if (!(rePhoneFirstPass.test(input))) return false
if (rePhoneDoubleSpace.test(input)) return false
Expand Down

0 comments on commit 22c6b76

Please sign in to comment.