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

IPBlock does not check if it is created from a wrong IP object #79

Open
arokettu opened this issue Jul 23, 2024 · 0 comments
Open

IPBlock does not check if it is created from a wrong IP object #79

arokettu opened this issue Jul 23, 2024 · 0 comments

Comments

@arokettu
Copy link

arokettu commented Jul 23, 2024

Examples:

> (string)\PhpIP\IPBlock::create(\PhpIP\IPv6::createFromString('ffff::ffff'), 32)::class
= "PhpIP\IPv4Block"
> (string)\PhpIP\IPBlock::create(\PhpIP\IPv6::createFromString('ffff::ffff'), 32)->getLastIp()
= "::ffff"

Expected:

> (string)\PhpIP\IPBlock::create(\PhpIP\IPv6::createFromString('ffff::ffff'), 32)::class
= "PhpIP\IPv6Block"
> (string)\PhpIP\IPBlock::create(\PhpIP\IPv6::createFromString('ffff::ffff'), 32)->getLastIp()
= "ffff:0:ffff:ffff:ffff:ffff:ffff:ffff"
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

No branches or pull requests

1 participant