diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-10-07 15:07:18 -0700 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-10-24 11:06:40 -0700 |
commit | 5c072495284de9aae26b1efcefcefc1d8571065a (patch) | |
tree | 2f3a3d346cd352ee2df801371e8d1c5b11c1d1bc /app/services/projects | |
parent | 1425a56c75beecaa289ad59587d636f8f469509e (diff) | |
download | gitlab-ce-5c072495284de9aae26b1efcefcefc1d8571065a.tar.gz |
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')
-rw-r--r-- | app/services/projects/operations/update_service.rb | 6 |
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 |