Skip to content

Commit 448ba26

Browse files
committed
redact passwords in the right place
1 parent ec42a18 commit 448ba26

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

github-services.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ def service(name)
5454
yield data, payload
5555
end
5656
rescue => boom
57+
hook_data = params[:data].dup
58+
%w[password token].each { |key| hook_data[key] &&= '<redacted>' }
5759
report_exception boom,
5860
:hook_name => name,
59-
:hook_data => params[:data],
61+
:hook_data => hook_data,
6062
:hook_payload => params[:payload]
6163
raise
6264
end
@@ -89,7 +91,6 @@ def report_exception(exception, other)
8991
}
9092

9193
# optional
92-
%w[password token].each { |key| other[key] &&= '<redacted>' }
9394
other.each { |key, value| data[key.to_s] = value.to_s }
9495

9596
Net::HTTP.new('aux1', 9292).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy