Skip to content

Limit recursion in regex parser #757

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

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

milseman
Copy link
Member

No description provided.

@milseman milseman requested a review from hamishknight July 26, 2024 15:36
@milseman
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, do we also want to apply the limit to character classes, as they can also be recursive? e.g [[[x]]]

@milseman milseman force-pushed the limit_recursion_swift_main branch from 52e232b to 4524f36 Compare July 29, 2024 15:17
@milseman
Copy link
Member Author

@swift-ci please test

@milseman
Copy link
Member Author

@swift-ci please test windows platform

@milseman milseman merged commit b5764dd into swiftlang:swift/main Aug 7, 2024
3 checks passed
@milseman milseman deleted the limit_recursion_swift_main branch August 7, 2024 13:20
milseman added a commit to milseman/swift-experimental-string-processing that referenced this pull request Sep 11, 2024
Cherry-picks some more changes from swift/main.

* Limit recursion in regex parser

* Also check for custom char class nesting
natecook1000 pushed a commit that referenced this pull request Sep 20, 2024
* Limit recursion in regex parser

* Also check for custom char class nesting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants