andsens / bootstrap-vz

Bootstrap Debian images for virtualized environments
http://bootstrap-vz.readthedocs.io/
Other
263 stars 145 forks source link

Fix a couple of (presumed) issues with regex escaping. #495

Closed andrewbogott closed 5 years ago

andrewbogott commented 5 years ago

In each of these cases we have an un-escaped \n or \t that gets passed to a regex. That means that the regexes actually contain tabs or newlines, respectively. After this change an actual '\t' and '\n' are passed in instead.

I have not tested this! I am writing this patch based on the assumption that /surely/ the original authors meant to pass in \t and \n to the regex and not actual tab or newline characters.

andsens commented 5 years ago

I have not tested this! I am writing this patch based on the assumption that /surely/ the original authors meant to pass in \t and \n to the regex and not actual tab or newline characters.

I did. Luckily the python regex engine doesn't mind either way :-)

But this is better of course, merging...