summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-11 08:01:27 +0000
committerRémy Coutable <remy@rymai.me>2016-07-11 08:01:27 +0000
commitb4d7fef6760e16b797a430c4128495bfd1271c9b (patch)
tree42077e0ef4908b941c69f2a8b6f95d81fdbbb3e6
parent11ba19e3d2ec5cef69bff1fdf12ee643012d6510 (diff)
parent47e20899c43a6a045726a55dcc4bfba47a4526b1 (diff)
downloadgitlab-ce-b4d7fef6760e16b797a430c4128495bfd1271c9b.tar.gz
Merge branch 'sshkey-ux' into 'master'
Add reminder to not paste private SSH keys ## What does this MR do? Just got the "How would you make GitLab better?" mail and thought that I could follow it. This commit adds a short reminder to not paste the private part of an SSH key to the form where one can add SSH keys to one's account. I think that's an useful message, both for people who aren't that experienced yet and for people who are sleep-deprived. :-) I decided to just list the most common key type, `ssh-rsa`. The full list of key types in the [CVS repository of OpenSSH](http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/ssh/sshkey.c?rev=HEAD&content-type=text/plain) contains some types which I'd regard as a bit obscure. Mentioning all of those types would probably clutter the form too much. We could think about whether to list what is probably the second most common key type, namely `ssh-dss`. But note that this key type [seems to be deprecated](https://security.stackexchange.com/questions/5096/rsa-vs-dsa-for-ssh-authentication-keys). ## Are there points in the code the reviewer needs to double check? I didn't actually test this one-line change. ## Why was this MR needed? It's not, strictly speaking, needed, but could be considered a nice addition. See merge request !4399
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/profiles/keys/_form.html.haml2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0eb7595fbfa..a977fc3fdbf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -62,6 +62,7 @@ v 8.10.0 (unreleased)
- Fix 404 redirect after validation fails importing a GitLab project
- Added setting to set new users by default as external !4545 (Dravere)
- Add min value for project limit field on user's form !3622 (jastkand)
+ - Add reminder to not paste private SSH keys !4399 (Ingo Blechschmidt)
v 8.9.5
- Add more debug info to import/export and memory killer. !5108
diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml
index b3ed59a1a4a..6ea358d9f63 100644
--- a/app/views/profiles/keys/_form.html.haml
+++ b/app/views/profiles/keys/_form.html.haml
@@ -4,7 +4,7 @@
.form-group
= f.label :key, class: 'label-light'
- = f.text_area :key, class: "form-control", rows: 8, required: true
+ = f.text_area :key, class: "form-control", rows: 8, required: true, placeholder: "Don't paste the private part of the SSH key. Paste the public part, which is usually contained in the file '~/.ssh/id_rsa.pub' and begins with 'ssh-rsa'."
.form-group
= f.label :title, class: 'label-light'
= f.text_field :title, class: "form-control", required: true