mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Prevent ReDos in words (#4450)
This commit is contained in:
committed by
John-David Dalton
parent
0e9d44eedb
commit
ad38dc0115
2
words.js
2
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. */
|
||||
|
||||
Reference in New Issue
Block a user