Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix two exponential regex backtracking vulnerabilities
ESCAPED_CHAR already matches `\\`, so matching it again in another alternative was causing exponential complexity explosion. This makes the following behavior changes: * `[foo\\\]` is no longer incorrectly accepted as a link reference. * `<foo\>` is no longer incorrectly accepted as an angle-bracketed link destination. Fixes commonmark#157. Signed-off-by: Anders Kaseorg <[email protected]>
- Loading branch information