Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: disable regexp backtracking#160

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
satazor merged 1 commit intomasterfrombugfix/regexp-backtrack
Nov 6, 2024
Merged

Conversation

@satazor
Copy link
Contributor

With a very large and well crafted string, the escaping made by cross-spawn hangs forever.

const{ argument}=require('cross-spawn/lib/util/escape');varstr="";for(vari=0;i<1000000;i++){str+="\\";}str+="◎";console.log("start")argument(str)console.log("end")

This PR disables regexp back tracking so that it doesn't suffer from this.https://javascript.info/regexp-catastrophic-backtracking for more details.

Lukortech and yanneves reacted with hooray emoji
@satazorsatazorforce-pushed thebugfix/regexp-backtrack branch from99d1c1c to6337ccaCompareNovember 6, 2024 09:06
@satazorsatazor merged commit5ff3a07 intomasterNov 6, 2024
1 check passed
satazor added a commit that referenced this pull requestNov 7, 2024
@satazorsatazor deleted the bugfix/regexp-backtrack branchNovember 7, 2024 13:04
satazor added a commit that referenced this pull requestNov 18, 2024
This was referencedJan 17, 2025
gurus00 pushed a commit to gurus00/node-cross-spawn that referenced this pull requestFeb 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@Thompson1985Thompson1985Thompson1985 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@satazor@Thompson1985

[8]ページ先頭

©2009-2025 Movatter.jp