Skip to content

Commit 22c6b76

Browse files
authored
Merge pull request #180 from ChALkeR/chalker/fix-style
Fix a ReDoS in 'style' format
2 parents 9df4acb + ccde29d commit 22c6b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

formats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exports['hostname'] = function (input) {
2828
}
2929
exports['alpha'] = /^[a-zA-Z]+$/
3030
exports['alphanumeric'] = /^[a-zA-Z0-9]+$/
31-
exports['style'] = /\s*(.+?):\s*([^;]+);?/g
31+
exports['style'] = /.:\s*[^;]/g
3232
exports['phone'] = function (input) {
3333
if (!(rePhoneFirstPass.test(input))) return false
3434
if (rePhoneDoubleSpace.test(input)) return false

0 commit comments

Comments
 (0)