Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This regex may be stucked by input #141

Closed
2bdenny opened this issue Apr 11, 2018 · 4 comments
Closed

This regex may be stucked by input #141

2bdenny opened this issue Apr 11, 2018 · 4 comments

Comments

@2bdenny
Copy link

2bdenny commented Apr 11, 2018

https://github.com/nhnent/tui.editor/blob/5a447c84e9acd6e5c1bd370d3ccf4c80dfe7b34f/src/js/markdownCommands/strike.js#L7
https://github.com/nhnent/tui.editor/blob/5a447c84e9acd6e5c1bd370d3ccf4c80dfe7b34f/src/js/markdownCommands/strike.js#L55

Hello =), I have tested all regexes in the project, and find this regex may be stucked by input. For example, the following code would cost over 30 seconds.

var testInput = "~&aF~&aF~&aF~&aF~&aF~&aF~&aFxDHD#";
hasStrikeSyntax(testInput);
@kyuwoo-choi
Copy link
Member

kyuwoo-choi commented Apr 11, 2018

LOL great 🤣

Then it should be fixed. It could be used in DOS attack.

Thank you for your persistent test @2bdenny 💯

@kyuwoo-choi
Copy link
Member

Hey @2bdenny
btw, from the other issues you posted, I heard you made a tool for it.
great job. tell me when you publish that. I'll give a star. 😃

@Lemonstars
Copy link

@kyuwoo-choi https://2bdenny.github.io/ReScue/ This is the tool.

@sohee-lee7
Copy link
Contributor

This issue does not occur in the latest version so close this issue.

seonim-ryu pushed a commit that referenced this issue Jan 2, 2020
seonim-ryu pushed a commit that referenced this issue Feb 5, 2020
Added test suite that checks a number of cases for hasFormat().
seonim-ryu pushed a commit that referenced this issue Feb 5, 2020
Added test suite that checks a number of cases for hasFormat().
js87zz pushed a commit that referenced this issue Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants