lib/raven/processor/sanitizedata.rb in sentry-raven-1.1.0 vs lib/raven/processor/sanitizedata.rb in sentry-raven-1.2.0
- old
+ new
@@ -1,7 +1,8 @@
# frozen_string_literal: true
require 'json'
+
module Raven
class Processor::SanitizeData < Processor
STRING_MASK = '********'.freeze
INT_MASK = 0
DEFAULT_FIELDS = %w(authorization password passwd secret ssn social(.*)?sec).freeze
@@ -70,11 +71,11 @@
REGEX_SPECIAL_CHARACTERS.select { |r| string.include?(r) }.any?
end
def parse_json_or_nil(string)
begin
- OkJson.decode(string)
- rescue Raven::OkJson::Error, NoMethodError
+ JSON.parse(string)
+ rescue JSON::ParserError, NoMethodError
nil
end
end
end
end