You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Isn't this a "Working as intended"? If you don't have proper regex syntax then you should have a failure case. Or are you asking for it to throw a error notice and not a rails crash trace?
I'm unsure what's desired here. What would you like to see happen instead?
These errors are, of course, inconvenient to get, but they do describe what the regex parsing issue was, allowing the user to fix the problem.
While we could implement some parsing in the page, doing so is non-trivial, particularly given that the regex variant that's used by MariaDB doesn't exactly match the regex variation which is used by either Rails or JavaScript, so it's not possible to just dump the provided regex into either of those parsers to see if it will compile.
It would not be unreasonable to implement very simple in-page parsing/validation of the provided regular expressions, effectively at the "do the number and direction of the non-escaped parentheses match".
For example, forgetting the closing parenthesis in a regex search causes a traceback.
Demo: https://metasmoke.erwaysoftware.com/search?utf8=%E2%9C%93&body_is_regex=1&body=%28oops
The text was updated successfully, but these errors were encountered: