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:
authorRyan Cobb <rcobb@gitlab.com>2019-10-08 01:07:18 +0300
committerRyan Cobb <rcobb@gitlab.com>2019-10-17 00:20:47 +0300
commit576818b578be87a90c60c1e734fd5f6df48bb82f (patch)
treeccf29823c63f6f6837a91f21b8df78c20a91328f /app/services/projects/operations/update_service.rb
parent7e2b1008547d8ced97a30e96ac6fbc2b7ad32a7f (diff)
Mask Sentry auth token
This makes it so we mask Sentry's auth token. This mask only occurs in the UI.
Diffstat (limited to 'app/services/projects/operations/update_service.rb')
-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