1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Correctly return nil in the (unlikely) case that we cant detect the IP address in the AnonymizeIPMask filter

This commit is contained in:
Holger Just 2018-02-19 14:42:50 +01:00
parent 5e29b7f912
commit 0d74a23b22

View File

@ -158,7 +158,7 @@ module Rackstash
masked_ip = ip.mask(128 - @ipv6_mask)
end
masked_ip.to_s.force_encoding(Encoding::UTF_8)
masked_ip.to_s.force_encoding(Encoding::UTF_8) if masked_ip
end
end