Skip to content
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

Merged
merged 5 commits into from Oct 5, 2020
Merged

Provide an option to fully mask the IP address #16506

merged 5 commits into from Oct 5, 2020

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Oct 1, 2020

fixes #16377

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Oct 1, 2020
@sgiehl sgiehl added this to the 4.0.0-RC milestone Oct 1, 2020
@@ -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()) {
Copy link
Member

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)

Copy link
Member Author

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...

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@tsteur
Copy link
Member

tsteur commented Oct 5, 2020

works

@tsteur tsteur merged commit 0073d58 into 4.x-dev Oct 5, 2020
@tsteur tsteur deleted the maskipfully branch October 5, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offer possibility to not store IP address at all
2 participants