This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
forked from mochajs/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regexp in utils.stackTraceFilter to prevent ReDoS mochajs#3416 (m…
…ochajs#3686) When the stacktrace begins with a large `Error.message` (single or multi line), Mocha's stack prettifier method (enabled by default) takes a long time to finish due to its regular expression. Certain assertions (e.g., `contains`, `deeplyEqual`) against large objects can trigger this problem. This PR alters the RegExp to skip over the error message portion of the stacktrace.
- Loading branch information
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters