python-hyper/rfc3986

Better handling of escaping in regex patterns

sethmlarson opened this issue · 4 comments

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.

Can you add an example of this?

Added a simple example.

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.

That's a good question, @sethmlarson