Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] IPv4-mapped IPv6 addresses incorrectly rejected#48421

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4frombonroyage:fix-ipv6-check
Dec 9, 2022
Merged

[HttpFoundation] IPv4-mapped IPv6 addresses incorrectly rejected#48421

fabpot merged 1 commit intosymfony:5.4frombonroyage:fix-ipv6-check
Dec 9, 2022

Conversation

@bonroyage
Copy link
Contributor

@bonroyagebonroyage commentedDec 1, 2022
edited
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#48420
LicenseMIT

I've based it on 4.4 because that's where#48050 was merged into, but I guess I'm 1 day too late with a fix for that version

emielmolenaar and vinceAmstoutz reacted with thumbs up emoji
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update thePR base branch to target one of these branches instead? 5.4, 6.0, 6.1, 6.2, 6.3.

Cheers!

Carsonbot

@bonroyagebonroyage changed the base branch from4.4 to5.4December 1, 2022 11:09
@bonroyage
Copy link
ContributorAuthor

Tests seem to be failing on unrelated issues in the Serializer component

@carsonbot
Copy link

Hey!

I think@PhilETaylor has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@PhilETaylor
Copy link
Contributor

Interesting. I have never seen a "IPv4-mapped IPv6 address" in the wild. I had never heard of them until today. Sorry if my previous PR caused you issues.

@bonroyage
Copy link
ContributorAuthor

bonroyage commentedDec 6, 2022
edited
Loading

Interesting. I have never seen a "IPv4-mapped IPv6 address" in the wild. I had never heard of them until today. Sorry if my previous PR caused you issues.

I hadn't seen them used anywhere until Azure when my regular IPv4 trusted proxies didn't work without converting them to IPv6 first ($ip6 = "::ffff:{$ip4}"). Fortunately, we managed to detect the issue early and lock to 6.1.7 for now.

There is a potential other discussion to be had about the expected behaviour of these methods, one I'm not familiar enough with IP to offer an educated opinion on. The question of whether IPv4-mapped IPv6 addresses should be compared against IPv4 addresses/CIDR and vice versa. Given the naming of these methods, it would seem wrong to return true in my opinion. Concretely in code samples:

checkIp4('10.0.0.123','::ffff:10.0.0.0/8')checkIp6('::ffff:10.0.0.123','10.0.0.0/8')

@emielmolenaar
Copy link

emielmolenaar commentedDec 6, 2022
edited
Loading

I have just tested this, and this fixes the issue for us. We are dealing with IPv4-mapped addresses like::ffff:172.28.0.1. I have not tested this PR using subnets.

@fabpot
Copy link
Member

Thank you@bonroyage.

@fabpotfabpot merged commit5ac1693 intosymfony:5.4Dec 9, 2022
@bonroyagebonroyage deleted the fix-ipv6-check branchDecember 13, 2022 12:12
@fabpotfabpot mentioned this pull requestDec 16, 2022
This was referencedDec 28, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@bonroyage@carsonbot@PhilETaylor@emielmolenaar@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp