Skip to content

Commit

Permalink
fix: sanitize event payload data (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
roelbondoc authored Jul 30, 2024
1 parent 183f811 commit f307212
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/honeybadger/event.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'forwardable'

require 'honeybadger/util/sanitizer'

module Honeybadger
class Event
extend Forwardable
Expand Down Expand Up @@ -47,10 +49,11 @@ def halted?
#
# @return [Hash] JSON representation of the event.
def as_json(*args)
payload.tap do |p|
data = payload.tap do |p|
p[:ts] = ts
p[:event_type] = event_type if event_type
end
Util::Sanitizer.sanitize(data)
end
end
end

0 comments on commit f307212

Please sign in to comment.