-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
regexp: add ErrLarge error #56041
Comments
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://go.dev/cl/444817 mentions this issue: |
For #56041 Change-Id: I6c98458b5c0d3b3636a53ee04fc97221f3fd8bbc Reviewed-on: https://go-review.googlesource.com/c/go/+/444817 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: xie cui <[email protected]>
For golang#56041 Change-Id: I6c98458b5c0d3b3636a53ee04fc97221f3fd8bbc Reviewed-on: https://go-review.googlesource.com/c/go/+/444817 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: xie cui <[email protected]>
I noticed this is still open while looking for something unrelated on https://goissues.org/regexp. Is there something else to do here? |
There is nothing else to do. Thanks for pointing that out. |
Indeed—this was both implemented (CL 444817) and covered in release notes (https://go.dev/doc/go1.20#regexp). Placing this issue in the corresponding milestone retroactively so it'll be easier to determine when this change happened if looking at this in the future. |
The fix for #55949 introduced various regexp size limits in the regexp parser.
To avoid adding new API, the fix returns ErrInternalError on regexps that are too large.
For Go 1.20 we want to give this error a proper value with a good message.
I propose to add a new ErrorCode:
See also #51684 which added a similar error after a similar security fix.
The text was updated successfully, but these errors were encountered: