]> 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)
committerIskren Chernev <me@iskren.info>
Wed, 6 Jul 2022 15:54:32 +0000 (18:54 +0300)
commit9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3
treefcb2474f52c2bb452d2f187b3ecd8f6b81d34a26
parent6374fd860aeff75e6c9d9d11540c6b22bc7ef175
[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