Read about our upcoming Code of Conduct on this issue

Commit aefbb5e3 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Merged upstream 13.19.0 bump on top of Heptapod Shell 13.18.1

Pipeline #26073 passed with stage
in 3 minutes and 56 seconds
......@@ -5,6 +5,10 @@
- Stop changing directory to the filesystem root !470
- Fix opentracing setup for gitlab-sshd !473
v13.18.1
- Modify regex to prevent partial matches
v13.18.0
- Fix thread-safety issues in gitlab-shell !463
......
......@@ -12,6 +12,12 @@
## 13.19.0
- Upstream version bump to v13.19.0 (GitLab 14.0 and 14.1 series)
(done as a merge on top of 13.18.1, hence probably includes the
fixes in upstream 13.19.1. We will confirm that separately)
## 13.18.1
- Upstream version bump to v13.18.1 (GitLab 13.12.9)
## 13.18.0
......@@ -19,7 +25,7 @@
## 13.17.0
- Upstream version bump to v13.17.0 (GitLab 13.10 and 13.11 series)
- Upstream version bump to v13.17.0 (GitLab 13.9 to 13.11 series)
## 13.16.0
......
......@@ -23,11 +23,10 @@
env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"},
arguments: []string{},
expectedArgs: &Shell{Arguments: []string{}, SshArgs: []string{}, CommandType: Discover, Env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"}},
},
{
}, {
desc: "It finds the key id in any passed arguments",
executable: &executable.Executable{Name: executable.GitlabShell},
env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"},
arguments: []string{"hello", "key-123"},
expectedArgs: &Shell{Arguments: []string{"hello", "key-123"}, SshArgs: []string{}, CommandType: Discover, GitlabKeyId: "123", Env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"}},
}, {
......@@ -28,9 +27,15 @@
desc: "It finds the key id in any passed arguments",
executable: &executable.Executable{Name: executable.GitlabShell},
env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"},
arguments: []string{"hello", "key-123"},
expectedArgs: &Shell{Arguments: []string{"hello", "key-123"}, SshArgs: []string{}, CommandType: Discover, GitlabKeyId: "123", Env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"}},
}, {
desc: "It finds the key id only if the argument is of <key-id> format",
executable: &executable.Executable{Name: executable.GitlabShell},
env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"},
arguments: []string{"hello", "username-key-123"},
expectedArgs: &Shell{Arguments: []string{"hello", "username-key-123"}, SshArgs: []string{}, CommandType: Discover, GitlabUsername: "key-123", Env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"}},
}, {
desc: "It finds the username in any passed arguments",
executable: &executable.Executable{Name: executable.GitlabShell},
env: sshenv.Env{IsSSHConnection: true, RemoteAddr: "1"},
......
......@@ -21,8 +21,8 @@
)
var (
whoKeyRegex = regexp.MustCompile(`\bkey-(?P<keyid>\d+)\b`)
whoUsernameRegex = regexp.MustCompile(`\busername-(?P<username>\S+)\b`)
whoKeyRegex = regexp.MustCompile(`\Akey-(?P<keyid>\d+)\z`)
whoUsernameRegex = regexp.MustCompile(`\Ausername-(?P<username>\S+)\z`)
)
type Shell struct {
......
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