summaryrefslogtreecommitdiff
path: root/app/services/projects
diff options
context:
space:
mode:
authorGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-10-29 15:58:06 +0000
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-10-29 15:58:06 +0000
commitd7f9136904d164afd7b1ac236f6f814729083e61 (patch)
tree8d7c2d11dd2f34870c709121188cce79bb45185b /app/services/projects
parent417e58fdc57523f11bb57f8aca7ff9121c3d3ee9 (diff)
parent576818b578be87a90c60c1e734fd5f6df48bb82f (diff)
downloadgitlab-ce-d7f9136904d164afd7b1ac236f6f814729083e61.tar.gz
Merge branch 'security-mask-sentry-token-ce' into 'master'
Mask sentry auth token See merge request gitlab/gitlabhq!3462
Diffstat (limited to 'app/services/projects')
-rw-r--r--app/services/projects/operations/update_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/projects/operations/update_service.rb b/app/services/projects/operations/update_service.rb
index 64519501ff4..0ca89664304 100644
--- a/app/services/projects/operations/update_service.rb
+++ b/app/services/projects/operations/update_service.rb
@@ -36,15 +36,17 @@ module Projects
organization_slug: settings.dig(:project, :organization_slug)
)
- {
+ params = {
error_tracking_setting_attributes: {
api_url: api_url,
- token: settings[:token],
enabled: settings[:enabled],
project_name: settings.dig(:project, :name),
organization_name: settings.dig(:project, :organization_name)
}
}
+ params[:error_tracking_setting_attributes][:token] = settings[:token] unless /\A\*+\z/.match?(settings[:token]) # Don't update token if we receive masked value
+
+ params
end
def grafana_integration_params