diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-06 12:05:15 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-06 12:05:15 +0300 |
commit | c6cbee846cd83c7b3a37e0565a0d994e0777d81a (patch) | |
tree | a24aa952bc7f199bd7e1970f91b32d74751b35b1 /spec/models | |
parent | 4b3b286eef64917247be032f67af1a062aac0254 (diff) | |
parent | 4ccd767abf45df909c43e93d8898096236c99e3d (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/models')
-rw-r--r-- | spec/models/key_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index 456bf221d62..2f819f60cbb 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -32,6 +32,13 @@ describe Key do describe "Methods" do it { is_expected.to respond_to :projects } + it { is_expected.to respond_to :publishable_key } + + describe "#publishable_keys" do + it 'strips all personal information' do + expect(build(:key).publishable_key).not_to match(/dummy@gitlab/) + end + end end context "validation of uniqueness" do |