Skip to content

Handle SSH keys that have multiple spaces between each marker

Stan Hu requested to merge sh-fix-ssh-keys-with-spaces into master

Notice what happens when a user adds a key with an extra space in between:

irb(main):004:0> 'ssh-rsa  foobar'.split(/ /)
=> ["ssh-rsa", "", "foobar"]

This would cause gitlab-shell to receive a blank argument for the actual key, leading to users unable to login.

Merge request reports