Opened 15 months ago

Closed 8 months ago

Last modified 6 months ago

#3710 closed New feature (fixed)

Anonymize IP should anonymize IPv6 addresses

Reported by: gehaxelt Owned by: halfdan
Priority: critical Milestone: 2.0 - Piwik 2.0
Component: Core Keywords: Anonymize IP
Cc: Sensitive: no

Description

Hello everybody,

I noticed that the anonimzeIP plugin does not anonymize/mask IPv6 addresses.

The plugin should mask the last 3 bytes of an IP address.
It works well for IPv4 addresses, but not for IPv6 addresses.
The newest (10.0.1) version of piwik was used.

Maybe someone could take a look at this plugin.

Regards,

Sebastian Neef aka gehaxelt

Attachments (1)

piwik_anonymizeip.png (23.6 KB) - added by gehaxelt 15 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 months ago by matt (mattab)

  • Milestone set to 1.11 - Piwik 1.11

Can you post a screenshot showing the problem, ie. what is your IP and what is the anonimized IP ?

Changed 15 months ago by gehaxelt

comment:2 Changed 15 months ago by gehaxelt

Hallo,

I'm not connected to the internet via IPv6 so I can't give you the diff between real IPv6 and anonymized IPv6.

I attached a screenshot of IPv4 and IPv6 addresses.

I hope I could help somehow.

Regards,

gehaxelt

comment:3 Changed 14 months ago by halfdan

  • Owner set to halfdan
  • Status changed from new to assigned

comment:4 Changed 13 months ago by matt (mattab)

  • Milestone changed from 1.12 - The Great 1.x Backlog to 2.x - Piwik 2.x

comment:5 Changed 13 months ago by kmindi

This is really a problem, in Germany it is not allowed to store the IP addresses.
For IPv4 addresses it is working with the plugin anonymize IP. THis should be extended ASAP to include support for IPv6.

comment:6 Changed 8 months ago by halfdan

  • Milestone changed from 2.x - Piwik 2.x to 2.0 - Piwik 2.0

comment:7 Changed 8 months ago by Fabian Becker

  • Resolution set to fixed
  • Status changed from assigned to closed

In c072a0e5911b544890a39e86c9efe024bb247577:

Extend AnonymizeIP to properly mask IPv6 addresses.

maskLength is now interpreted as "mask level" (0-4) and determines the number of bits to be masked.

Level IPv4 IPv6
0 0 0
1 8 64
2 16 80
3 24 104
4 32 n/a

fixes #3710

comment:8 Changed 8 months ago by Fabian Becker

In 2c378a2f2bb55b81b8de6724d8fa87036fb3b4ac:

Fix test, simplify

refs #3710

comment:9 Changed 6 months ago by matt (mattab)

  • Priority changed from normal to critical
  • Summary changed from Anonymize IP does not mask IPv6 addresses to Anonymize IP should anonymize IPv6 addresses
  • Type changed from Bug to New feature

Great fix!

Note: See TracTickets for help on using tickets.