lib/hedgelog/scrubber.rb in hedgelog-0.1.8 vs lib/hedgelog/scrubber.rb in hedgelog-0.1.9
- old
+ new
@@ -6,15 +6,17 @@
@replacements = replacements || [
ScrubReplacement.new('password', '**********')
]
end
+ # rubocop:disable Security/MarshalLoad
def scrub(data)
# Need to Marshal.dump/Marshal.load to deep copy the input so that scrubbing doesn't change global state
d = Marshal.load(Marshal.dump(data))
@replacements.each do |r|
r.scrub_hash(d)
end
d
end
+ # rubocop:enable Security/MarshalLoad
end
end