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

INET type throws error on correct value #20

Open
sspat opened this issue Dec 16, 2020 · 2 comments
Open

INET type throws error on correct value #20

sspat opened this issue Dec 16, 2020 · 2 comments

Comments

@sspat
Copy link

sspat commented Dec 16, 2020

Given an IPv6 value of ::ffff:10.233.65.138, I cannot save it to the database, as the regexp validation in \Doctrine\DBAL\PostgresTypes\InetType::convertToDatabaseValue does not pass for it.

This value passes a check with filter_var

var_dump(filter_var('::ffff:10.233.65.138', FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); // string(20) "::ffff:10.233.65.138"
@sspat
Copy link
Author

sspat commented Dec 16, 2020

PostgreSQL also is accepting this value in a column of type inet

@simPod
Copy link

simPod commented Jan 12, 2021

IMO there's no need for inet validation in the type

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

2 participants