diff options
| author | Stan Hu <stanhu@gmail.com> | 2018-08-09 17:52:00 +0000 |
|---|---|---|
| committer | Stan Hu <stanhu@gmail.com> | 2018-08-09 17:52:00 +0000 |
| commit | 272b60f718c419b97908153a542f1e3fca52e09b (patch) | |
| tree | 4841aa4af4011e8e206c434f4717d2938c12e191 /bin/gitlab-shell | |
| parent | c6577e0d75f51b017f2f332838b97c3ca5b497c0 (diff) | |
| parent | cce62b3571617e2df3aee8df4b3b1908191dc495 (diff) | |
| download | gitlab-shell-272b60f718c419b97908153a542f1e3fca52e09b.tar.gz | |
Merge branch 'fix-ssh-certificate-regressions-8-1' into '8-1-stable'
Fix two regressions in SSH certificate support (8.1)
See merge request gitlab-org/gitlab-shell!226
Diffstat (limited to 'bin/gitlab-shell')
| -rwxr-xr-x | bin/gitlab-shell | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/gitlab-shell b/bin/gitlab-shell index 1016570..93a79f6 100755 --- a/bin/gitlab-shell +++ b/bin/gitlab-shell @@ -17,7 +17,11 @@ require_relative '../lib/gitlab_init' # require File.join(ROOT_PATH, 'lib', 'gitlab_shell') -if GitlabShell.new(ARGV.join).exec(original_cmd) +# We must match e.g. "key-12345" anywhere on the command-line. See +# https://gitlab.com/gitlab-org/gitlab-shell/issues/145 +who = /\b(?:(?:key|user)-[0-9]+|username-\S+)\b/.match(ARGV.join(' ')).to_s + +if GitlabShell.new(who).exec(original_cmd) exit 0 else exit 1 |
