Better handling of escaping in regex patterns
sethmlarson opened this issue · 4 comments
sethmlarson commented
Currently we erroneously accept \\
in the USERINFO_RE
(and probably many more!) due to regex escaping acting differently when inside or outside of a character class.
Example: http://user\\@google.com
shouldn't be a valid URL but is accepted by us.
sigmavirus24 commented
Can you add an example of this?
sethmlarson commented
Added a simple example.
sethmlarson commented
After looking at this more we do catch it when running the validator. Is this something that should only get caught at the validator stage or the parsing stage? Closing for now.
sigmavirus24 commented
That's a good question, @sethmlarson