Commit b4d7fef6 authored by Rémy Coutable's avatar Rémy Coutable

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
parents 11ba19e3 47e20899
...@@ -62,6 +62,7 @@ v 8.10.0 (unreleased) ...@@ -62,6 +62,7 @@ v 8.10.0 (unreleased)
- Fix 404 redirect after validation fails importing a GitLab project - Fix 404 redirect after validation fails importing a GitLab project
- Added setting to set new users by default as external !4545 (Dravere) - 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 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 v 8.9.5
- Add more debug info to import/export and memory killer. !5108 - Add more debug info to import/export and memory killer. !5108
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.form-group .form-group
= f.label :key, class: 'label-light' = 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 .form-group
= f.label :title, class: 'label-light' = f.label :title, class: 'label-light'
= f.text_field :title, class: "form-control", required: true = f.text_field :title, class: "form-control", required: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment