by jeroenhd · 5y ago · 0 comments
I don't really see what problem using a hyphen in a username could pose, unless there's some kind of filter being applied that doesn't take into account the previously permitted characters. I'd guess someone applied an [A-z0-9]+ without thinking too much about it because that's what the current username rules are.
I'm more surprised that there's a second authorization endpoint, Github could've just used their existing OAuth2 implementation to log users in if they didn't want to reuse the existing login code.
`[A-z]` -> https://regex101.com/r/IlhPiD/1 `[A-Za-z]` -> https://regex101.com/r/iWjwf2/1
After looking it up, `\p{L}` looks like it matches letters https://regex101.com/r/1UiG9S/1.