-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Add optional $v4Bytes
and $v6Bytes
parameters to IpUtils::anonymize()
#58038
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dc6d42e
to
5a3ccf4
Compare
5a3ccf4
to
116cce2
Compare
$bytesToAnonymize
argument to IpUtils::anonymize()
$anonymizedBytesForV4
and $anonymizedBytesForV6
arguments to IpUtils::anonymize()
72c535a
to
86313bb
Compare
OskarStark
reviewed
Aug 20, 2024
86313bb
to
78fd918
Compare
78fd918
to
7c524a3
Compare
$anonymizedBytesForV4
and $anonymizedBytesForV6
arguments to IpUtils::anonymize()
$v4Bytes
and $v6Bytes
arguments to IpUtils::anonymize()
OskarStark
reviewed
Aug 21, 2024
$v4Bytes
and $v6Bytes
arguments to IpUtils::anonymize()
$v4Bytes
and $v6Bytes
parameters to IpUtils::anonymize()
7c524a3
to
d21654f
Compare
nicolas-grekas
approved these changes
Aug 22, 2024
* Removes the last byte for v4 and the last 8 bytes for v6 IPs | ||
* Removes the last bytes of IPv4 and IPv6 addresses (1 byte for IPv4 and 8 bytes for IPv6 by default). | ||
* | ||
* @param int<0, 4> $v4Bytes |
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.
Suggested change
* @param int<0, 4> $v4Bytes | |
* @param int<0, 4> $v4Bytes |
… `IpUtils::anonymize()`
d21654f
to
53c4f92
Compare
fabpot
approved these changes
Aug 22, 2024
Thank you @alexandre-daubois. |
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this pull request
Aug 26, 2024
…ze()` (alexandre-daubois) This PR was merged into the 7.2 branch. Discussion ---------- [HttpFoundation] Add new parameters to `IpUtils::anonymize()` Related to symfony/symfony#58038 Commits ------- 84da11c [HttpFoundation] Add new parameters to `IpUtils::anonymize()`
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR answers to the need of more anonymization of IP addresses. This adds 2 new parameters to the
IpUtils::anonymize()
that you can use this way: