mirror of
https://github.com/meineerde/rackstash.git
synced 2025-12-19 15:01:12 +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:
parent
5e29b7f912
commit
0d74a23b22
@ -158,7 +158,7 @@ module Rackstash
|
|||||||
masked_ip = ip.mask(128 - @ipv6_mask)
|
masked_ip = ip.mask(128 - @ipv6_mask)
|
||||||
end
|
end
|
||||||
|
|
||||||
masked_ip.to_s.force_encoding(Encoding::UTF_8)
|
masked_ip.to_s.force_encoding(Encoding::UTF_8) if masked_ip
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user