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
Avoid panicking if a bad regexp is returned when hijacking using an incorrect pattern #982
Comments
Error is usually used for uncontrolled contents such as user input, panic is usually used for static content. if it returns the error what would you do with the error? |
In this context, I'd expect it to raise an error and halt the execution of program. |
You can always check the pattern before you pass it to the code.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using an incorrect pattern (like
**.example.com/**
) in theHijackRouter.Add()
method will make the program panic instead of returning an error.Rod Version: v0.114.5
The text was updated successfully, but these errors were encountered: