Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-06 12:05:15 +0300
committerDouwe Maan <douwe@gitlab.com>2015-08-06 12:05:15 +0300
commitc6cbee846cd83c7b3a37e0565a0d994e0777d81a (patch)
treea24aa952bc7f199bd7e1970f91b32d74751b35b1 /spec/controllers
parent4b3b286eef64917247be032f67af1a062aac0254 (diff)
parent4ccd767abf45df909c43e93d8898096236c99e3d (diff)
Merge branch 'remove-email-from-published-keys' into 'master'
Only publish ssh key-type and key Now when requesting my keys; my emailadres is exposed. [My keys](https://gitlab.com/zj.keys) To prevent harvesting only key-type and the key itself are displayed instead of all data supplied when uploaded. See merge request !850
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/profile_keys_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/profile_keys_controller_spec.rb b/spec/controllers/profile_keys_controller_spec.rb
index 593d3e9eb56..b6573f105dc 100644
--- a/spec/controllers/profile_keys_controller_spec.rb
+++ b/spec/controllers/profile_keys_controller_spec.rb
@@ -48,6 +48,17 @@ describe Profiles::KeysController do
expect(response.body).not_to eq("")
expect(response.body).to eq(user.all_ssh_keys.join("\n"))
+
+ # Unique part of key 1
+ expect(response.body).to match(/PWx6WM4lhHNedGfBpPJNPpZ/)
+ # Key 2
+ expect(response.body).to match(/AQDmTillFzNTrrGgwaCKaSj/)
+ end
+
+ it "should not render the comment of the key" do
+ get :get_keys, username: user.username
+
+ expect(response.body).not_to match(/dummy@gitlab.com/)
end
it "should respond with text/plain content type" do