New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an option to fully mask the IP address #16506
Conversation
@@ -25,6 +26,11 @@ class IPAnonymizer | |||
*/ | |||
public static function applyIPMask(IP $ip, $maskLength) | |||
{ | |||
// IPv6 can't handle anonymizing 4 bytes | |||
if ($maskLength == 4 && $ip instanceof IPv6 && !$ip->isMappedIPv4()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgiehl wouldn't we add this maybe to the IPv6 class? (I suppose IPv4 already supports it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created matomo-org/component-network#15
We will need to publish a new release and update the component here after merging...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 left a comment in that PR. Feel free to merge the component PR afterwards, create the release and then update this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
works |
fixes #16377