Closed cg505 closed 4 years ago
Lol, I guess we missed this back in 2015 (or whenever it was).
Yeah, looks like early 2016 from rt#4177, so it's been more than 4 years now 😅
I feel a little scared injecting variables into a regex
Side note, I don't actually understand this regex. Shouldn't it be ^([a-z]{3,16})(/[a-z]*)?@OCF\.BERKELEY\.EDU$
instead? I would think that the \\
is an escaped backslash character, followed by 1 of any non-whitespace character .
, but when I run both regexes they seem to function as intended.
It's double escaping, once for python, and once for the dot so it's interpreted as a literal dot. Maybe using a r
string here would be better to make that less confusing?
I'm just going to go ahead and merge this now, the r string would be better but I think we should just get this out. If someone wants to make a PR for that, it would be great but I can't be bothered.
This was causing passwd to fail for usernames longer than 8 chars.