]> git.ipfire.org Git - thirdparty/moment.git/commit
[bugfix] Fix redos in preprocessRFC2822 regex (#6015)
authorKhang Vo (doublevkay) <45411113+vovikhangcdv@users.noreply.github.com>
Wed, 6 Jul 2022 15:28:25 +0000 (22:28 +0700)
committerGitHub <noreply@github.com>
Wed, 6 Jul 2022 15:28:25 +0000 (18:28 +0300)
commit7aebb1617fc9bced87ab6bc4c317644019b23ce7
tree8f839cfdeb2b8fbc361905fc2105e6cc717dcf72
parentc5b23348783dfecc8203446b2dad57c8a55501ff
[bugfix] Fix redos in preprocessRFC2822 regex (#6015)

* fix ReDoS in preprocessRFC2822 regex

Fixes: [#2936](https://github.com/moment/moment/issues/6012)
Disallow nested rfc2822 comments to prevent quadratic regex execution time (i.e each open bracket is considered at most twice).
src/lib/create/from-string.js