summaryrefslogtreecommitdiff
path: root/cmd/gitlab-shell/command/command_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Relax key and username matching for sshdsh-improve-key-matching-sshdStan Hu2021-11-101-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the way sshd works, gitlab-shell could be called with a single string in the form: ``` /path/to/gitlab-shell -c key-id ``` However, due to the tightening of the regular expressions in fcff692b this string no longer matches, so logins would fail with: ``` Failed to get username: who='' is invalid ``` This can be reproduced by changing the user's shell to point to gitlab-shell. For example: ``` usermod git -s /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell ``` While setting gitlab-shell as the user's shell isn't officially supported, gitlab-shell still should be able to cope with the key being specified as the last argument. We now split the argument list and use the last value. Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/530
* Don't swallow an error parsing SSH_ORIGINAL_COMMANDNick Thomas2021-09-271-1/+1
|
* refactor: cleanup func signature and remove unused argsfeistel2021-09-081-4/+4
|
* refactor: rearchitect command and executable Go modulesfeistel2021-09-081-0/+281