From ad38dc01150e6ed731ec41fd3ac6c944eda60dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Am=C3=A9rico?= Date: Wed, 28 Aug 2019 20:07:13 -0300 Subject: [PATCH] Prevent ReDos in words (#4450) --- words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/words.js b/words.js index 884312e53..fef05f80a 100644 --- a/words.js +++ b/words.js @@ -1,7 +1,7 @@ import unicodeWords from './.internal/unicodeWords.js' const hasUnicodeWord = RegExp.prototype.test.bind( - /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ + /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ ) /** Used to match words composed of alphanumeric characters. */