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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-30 07:50:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-30 07:50:46 +0300
commite6572d41b847c839ce49bc022a8cd1b99216798b (patch)
tree419eeffb09aafcd9d5a82e43c823b8cfbf88963e /app/models/hooks/web_hook_log.rb
parent1f6654659564013b8aa4f3572158cb63d3a519c1 (diff)
Add latest changes from gitlab-org/security/gitlab@15-6-stable-ee
Diffstat (limited to 'app/models/hooks/web_hook_log.rb')
-rw-r--r--app/models/hooks/web_hook_log.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/hooks/web_hook_log.rb b/app/models/hooks/web_hook_log.rb
index 2b26147b494..9de6f2a1b57 100644
--- a/app/models/hooks/web_hook_log.rb
+++ b/app/models/hooks/web_hook_log.rb
@@ -48,6 +48,13 @@ class WebHookLog < ApplicationRecord
request_data == OVERSIZE_REQUEST_DATA
end
+ def request_headers
+ super unless web_hook.token?
+ super if self[:request_headers]['X-Gitlab-Token'] == _('[REDACTED]')
+
+ self[:request_headers].merge('X-Gitlab-Token' => _('[REDACTED]'))
+ end
+
private
def obfuscate_basic_auth