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

IPv6-support #1

Merged
merged 1 commit into from
Feb 8, 2012
Merged

IPv6-support #1

merged 1 commit into from
Feb 8, 2012

Conversation

bmarwell
Copy link
Contributor

@bmarwell bmarwell commented Feb 6, 2012

  • Added IPv6 support (incomplete)
  • Only set last touple of IPv4 to null. This is fine even for german
    concerns.

* Only set last touple of IPv4 to null. This is fine even for german
concerns.
@bmarwell
Copy link
Contributor Author

bmarwell commented Feb 6, 2012

As I am on IPv6 already (tunnelbroker.net) this is a concern to me. Also, this is the very first thing I did on github, I hope I did it all correctly!

I changed the privacy thing to the last touple, as it is being done in Piwik as well. This is more than sufficient, isn't it?

@ghost ghost assigned sas101 Feb 6, 2012
@sas101
Copy link
Collaborator

sas101 commented Feb 6, 2012

Looks good! Thank you for your contribution!

With "incomplete" do you mean in regard to your comment about ::ffff:127.0.0.1?

I understand the problem is in general with this type of dotted-quad notation, because there can be any kind of IPv4 address at the end, not only localhost. Is that true?
If that's the case, I suspect we should handle that special case.
Although I intend to keep the function as fast as possible.

I agree that removing the last tuple of the IPv4 address is more than enough.

@bmarwell
Copy link
Contributor Author

bmarwell commented Feb 8, 2012

Hi,

yes, you can always have an IPv4 address at the end of IPv6 addresses. But the change I made might still be sufficient, as the part behind the last colon still is being nulled. Therefore it might not be neccessary to handle this special case.

I agree that this pseudonymize-plugin should stay as simple as possible.

@bmarwell
Copy link
Contributor Author

bmarwell commented Feb 8, 2012

PS: This pushes the PHP requirement to PHP >= 5.2.0.
http://php.net/manual/en/function.filter-var.php

sas101 pushed a commit that referenced this pull request Feb 8, 2012
IPv6-support, Only set last touple of IPv4 to null. This is fine even for German concerns.
@sas101 sas101 merged commit c89bddb into simlabs-apps:master Feb 8, 2012
@sas101
Copy link
Collaborator

sas101 commented Feb 8, 2012

OK, I merged it now.

Will add some simple tests, because I think it will null out the whole IPv4 address at the end of an IPv6 address, thus leaving us with ::ffff:0
Then we'll see..

@sas101
Copy link
Collaborator

sas101 commented Feb 8, 2012

Indeed my tests show, that the whole IPv4 address is removed.
Checking ::ffff:127.0.0.1 => ::ffff:127.0.0.0 ? ... FAILED - was ::ffff:0
Checking ::ffff:192.0.43.10 => ::ffff:192.0.43.0 ? ... FAILED - was ::ffff:0
see the bug report #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants