4 ms·
This reasoning is wrong to me. I see this very much as a problem with using usernames to refer to repositories in the first place, not with username reuse. For
by mehrdadn 9y ago
This reasoning is wrong to me. I see this very much as a problem with using usernames to refer to repositories in the first place, not with username reuse. For heaven's sake, let me just refer to a repo by a unique ID of its own. There's no reason for the username to be in the repository URL.
- gumby 9y agoHear hear! Fixing the real problem.
- tomphoolery 9y agohere's one reason: `git clone some-user/some-repo`
- mehrdadn 9y agoOh come on, this is not a justification, it's just complete laziness. Just spend the extra 5 seconds copying the repo URL from GitHub. It's not like you can avoid that the first time around when you don't know the username anyway (or on subsequent times for that matter, unless the username is pretty memorable), and you'll have a robust URL afterwards without security holes. And plus, then people can change their usernames without breaking links. The cost/benefit ratio is extremely low.
- TheRealPomax 9y agoSo, a sha1 commit hash, which gives you an exact filesystem snapshot, and can't be faked with identical content if someone gets their hands on someone's account? The real issue is Go just pointing to "whatever is the current HEAD" which is insane.
- mehrdadn 9y agoNo, a commit hash points to a commit. This is for when we want to point to a repo, i.e. For exactly the same situations where we currently use URLs with usernames.
- TheRealPomax 9y agoThe original problem was Go rather stupidlt pointing to a repo, instead of a specific commit on a repo. Normal github use at the very least would be to point to tags. Someone deleted their account, all those tags (which are empty commits) become invalid. Because you're not building a list of just username and repo names for software dependent purposes, right? That would be a massive security failing on your part.
- whyever 9y agoThe thing is, SHA1 can be faked with identical content. https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html https://security.googleblog.com/2017/02/announcing-first-sha...
- calcifer 9y agoIt's not really a concern for Git [1]. [1] https://plus.google.com/+LinusTorvalds/posts/7tp2gYWQugL https://plus.google.com/+LinusTorvalds/posts/7tp2gYWQugL
- whyever 9y agoIt's not a concern for Linus, but maybe it should be? If SHA1's security properties don't matter, why was SHA1 chosen and not something faster? What about signing commits? This is affected by SHA1 collisions.
- grzm 9y agoWould you mind elaborating on this? What scenario are you envisioning where this is an issue? I'd caveat that with "in practice", but I'm willing to set that aside to avoid derailing the conversation into what's practical or not.
- thethirdone 9y ago> What scenario are you envisioning where this is an issue? Not the parent, but the problem specifically with using github repos with a hash to identify a specific commit is that if someone can make a collision, they can make the code anything they want. Linus doesn't consider this a problem, because he doesn't use untrusted repositories.
- grzm 9y agoThe hash is based on the content of the repo (and its history), is it not? Or am I misunderstanding? It's not that they can make a repo with arbitrary code of their choice cause a collision, correct? The chance of the collision be something meaningful in the context of the code at hand is vanishingly small, isn't it? Is it the concern that this can happen at all?
- mulmen 9y agoDo Github usernames have to be a person? Seems like an owner name to me, it could easily be an organization name.
- petre 9y agoYou can set up orgs with multiple persons on GitHub. The URL would then be: github.com/org/repo