Hacker News new | ask | show | jobs
by GordonS 1663 days ago
I don't mean to "victim blame", but I'm curious why you'd choose a username ending in a hyphen in the first place? (I would have thought this wouldn't work on lots of services)
2 comments

I signed up to GitHub almost 11 years ago, and someone else already registered the username I used for everything. So 11-years-ago-me tacked on a hyphen as I had seen a few other people do it, too.
> I signed up to GitHub almost 11 years ago, and someone else already registered the username I used for everything. So 11-years-ago-me tacked on a hyphen

"I purposefully chose to create a nearly identical username to an existing user" isn't a great defense to someone saying the problem is between the chair and keyboard.

At best you didn't think of the possible confusion you'd cause.

Both the other account and myself are quite active on GitHub. There has been a mistype maybe 5 times in 11 years.

So sorry, but no. Things have been fine. In places where the hyphen is ambiguous, I always make a point to mention it. It's never really been an issue, and the other individual has always been quite nice when the hyphen is omitted, kindly pinging me instead.

I'm not trying to defend against anything except poor attempts to paint me as somehow malicious...

> "I purposefully chose to create a nearly identical username to an existing user"

Is that even surprising? Some names are just so common that people use them all the time and ends up as John, John_ , John-, John1, John11. John100

Hyphens and underscores are often permitted characters in usernames, more so than exclamation marks or other special characters.

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.

Fun ASCII gotcha: [A-z] includes [ ] \ ^ _ and `
I think this is why I usually see `[A-Za-z]` for ascii. My previous employer decidedly ignored "non-english" text.

`[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.