summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
diff options
context:
space:
mode:
authorPablo Carranza <pcarranza@gmail.com>2016-03-11 14:37:11 +0000
committerPablo Carranza <pcarranza@gmail.com>2016-03-24 20:48:27 +0000
commit79aed51b9010151a48cc519e41d0805e652cb24e (patch)
tree5714c38179abdd3cb91717ea0d109277cbba9509 /lib/gitlab_net.rb
parentaedf824d2d7f5bce34d9e8dba728af05ea236b79 (diff)
downloadgitlab-shell-79aed51b9010151a48cc519e41d0805e652cb24e.tar.gz
Add encoding for the ssh key on the url
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r--lib/gitlab_net.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index 39384c7..8b6d33b 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -57,7 +57,7 @@ class GitlabNet
end
def authorized_key(key)
- resp = get("#{host}/authorized_keys?key=#{key}")
+ resp = get("#{host}/authorized_keys?key=#{URI.escape(key, '+/=')}")
JSON.parse(resp.body) if resp.code == "200"
rescue
nil