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
path: root/spec
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-01-24 18:24:10 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-24 18:24:12 +0300
commit9149beee1b363fbceec7c48a51a4e85ba19d06a5 (patch)
tree0c4bf8805a31d464dd4a4bb69e602bb3a589c5af /spec
parent0270de55ca6d4ddb0d0d67f98309d0f1ba2b9cef (diff)
Merge branch 'security-fix-user-email-tag-push-leak-11-6' into 'security-11-6'
[11.6] Security fix user email tag push leak See merge request gitlab/gitlabhq!2808 (cherry picked from commit 7260e6e0c2ad3df7dea2c0bd5c0d91c4bc5b15ae) 589c57c7 Prefer build() rather than create() 63d13410 Fix private user email being visible in tag webhooks
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/data_builder/push_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/data_builder/push_spec.rb b/spec/lib/gitlab/data_builder/push_spec.rb
index befdc18d1aa..0c4decc6518 100644
--- a/spec/lib/gitlab/data_builder/push_spec.rb
+++ b/spec/lib/gitlab/data_builder/push_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::DataBuilder::Push do
let(:project) { create(:project, :repository) }
- let(:user) { create(:user) }
+ let(:user) { build(:user, public_email: 'public-email@example.com') }
describe '.build_sample' do
let(:data) { described_class.build_sample(project, user) }
@@ -36,7 +36,7 @@ describe Gitlab::DataBuilder::Push do
it { expect(data[:user_id]).to eq(user.id) }
it { expect(data[:user_name]).to eq(user.name) }
it { expect(data[:user_username]).to eq(user.username) }
- it { expect(data[:user_email]).to eq(user.email) }
+ it { expect(data[:user_email]).to eq(user.public_email) }
it { expect(data[:user_avatar]).to eq(user.avatar_url) }
it { expect(data[:project_id]).to eq(project.id) }
it { expect(data[:project]).to be_a(Hash) }