8000 IpUtils::checkIp4() should allow `/0` networks · Issue #14674 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

IpUtils::checkIp4() should allow /0 networks #14674

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

Closed
zerkms opened this issue May 17, 2015 · 3 comments
Closed

IpUtils::checkIp4() should allow /0 networks #14674

zerkms opened this issue May 17, 2015 · 3 comments

Comments

@zerkms
Copy link
Contributor
zerkms commented May 17, 2015

The 0.0.0.0/0 is a valid CIDR and every IP address falls into it.

I think IpUtils::checkIp4() should allow it

@zerkms zerkms changed the title IpUtils::checkIp4() should allow /0 nets IpUtils::checkIp4() should allow /0 networks May 17, 2015
@dosten
Copy link
Contributor
dosten commented May 17, 2015

Do you have any reference about this?

@zerkms
Copy link
Contributor Author
zerkms commented May 17, 2015

@zerkms
Copy link
Contributor Author
zerkms commented May 17, 2015

http://tools.ietf.org/html/rfc4632

In CIDR notation, a prefix is shown as a 4-octet
quantity, just like a traditional IPv4 address or network number,
followed by the "/" (slash) character, followed by a decimal value
between 0 and 32 that describes the number of significant bits.

http://tools.ietf.org/html/rfc4632#section-3.1

zerkms added a commit to zerkms/symfony that referenced this issue May 19, 2015
zerkms added a commit to zerkms/symfony that referenced this issue May 19, 2015
zerkms added a commit to zerkms/symfony that referenced this issue May 19, 2015
zerkms added a commit to zerkms/symfony that referenced this issue May 19, 2015
…icitly, since it's the only allowed network of a `/0` size
fabpot added a commit that referenced this issue May 20, 2015
…works (zerkms)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #14690).

Discussion
----------

[HttpFoundation] IpUtils::checkIp4() should allow `/0` networks

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14674
| License       | MIT

Technically it's a breaking change, since the result of the

    IpUtils::checkIp4('1.2.3.4', '0.0.0.0/0')

call was `false` now `true`.

Practically - no one should ever relied on this since it's simply wrong

Commits
-------

921ecff [HttpFoundation] IpUtils::checkIp4() should allow  networks
@zerkms zerkms closed this as completed May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0