diff options
author | Max Krasnyansky <max.krasnyansky@gmail.com> | 2013-04-24 21:07:57 -0700 |
---|---|---|
committer | Max Krasnyansky <max.krasnyansky@gmail.com> | 2013-04-24 21:07:57 -0700 |
commit | 199b2251575bb3de1e9454dcfdee7ed656d70e90 (patch) | |
tree | 1576c76dff7589d2e14944d03168d76dac4b6e95 /lib/gitlab_keys.rb | |
parent | fc55020536f738f253a4c21285e38fd59e549056 (diff) | |
download | gitlab-shell-199b2251575bb3de1e9454dcfdee7ed656d70e90.tar.gz |
Regex used in rm-key command is too lax
Basically the issue is that 'gitlab-shell rm-key key-2' removes all keys that match "key-2" pattern.
"key-20", "key-25", etc.
This change makes the regex used in the sed command more strict.
Diffstat (limited to 'lib/gitlab_keys.rb')
-rw-r--r-- | lib/gitlab_keys.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb index 2173f4c..7e6362a 100644 --- a/lib/gitlab_keys.rb +++ b/lib/gitlab_keys.rb @@ -31,7 +31,7 @@ class GitlabKeys end def rm_key - cmd = "sed -i '/shell #{@key_id}/d' #{auth_file}" + cmd = "sed -i '/shell #{@key_id}\"/d' #{auth_file}" system(cmd) end end |