-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New SSH keys with comments including whitespace are truncated #1622
Comments
Thanks your feedback! Simple question first: Does truncated SSH key make you unable to git push/pull through SSH? |
That's correct. All repo access is denied. |
With apologies, I'd forgotten to check which version of GoGS I was running. I've updated now to 0.6.11, and can confirm that key comments are still being truncated but -- for reasons unclear to me -- I'm able to authenticate successfully. I'd say there's still a bug, in that comments shouldn't be truncated, but that its severity is diminished somewhat. Again, sorry for filing an issue against an older version. Other info: |
Hi @JeffMelton thanks for following up! I've pushed a fix on |
Yes, that seems to have done the trick. Thanks! |
@JeffMelton Awesome, thanks your confirmation! |
* bug fixed for API to get user's repos * add tests and fix another place * test user2 since user1 has no repos
Steps to recreate:
ssh-keygen -t rsa -b 4096 -C "comment with whitespace"
xclip -sel clip < ~/.ssh/id_rsa.pub
ssh -T git@example.com
Expected behavior:
I've looked at the git user's authorized_keys file on my server, and can confirm that the comment is truncated at the first whitespace. If one creates a new SSH key without comment, or without whitespace, i.e.
ssh-keygen -t rsa -b 4096 -C "comment_without_whitespace"
, and follows the same steps as above for adding the key to the GoGS user, one is able to authenticate successfully.(updates for clarity and more info)
The text was updated successfully, but these errors were encountered: