|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48310 filter accepts invalid IPv6 address
Submitted: 2009-05-17 16:49 UTC Modified: 2009-07-16 23:33 UTC
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:0 (0.0%)
From: geoffers+phpbugs at gmail dot com Assigned: felipe (profile)
Status: Closed Package: Filter related
PHP Version: 5.*, 6CVS (2009-05-16) OS: Mac OS 10.5.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
26 + 15 = ?
Subscribe to this entry?

 [2009-05-17 16:49 UTC] geoffers+phpbugs at gmail dot com
The string '0:0:0:' is not a valid IPv6 address. The 
filter extension allows it.

Reproduce code:
var_dump(filter_var('0:0:0:', FILTER_VALIDATE_IP, FILTER_FLAG_IPV6));

Expected result:

Actual result:
string(21) "0:0:0:"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-17 17:18 UTC] geoffers+phpbugs at gmail dot com
Both 5.2 and 5.3 CVS give the same output as 5.2.9
 [2009-06-07 17:00 UTC] birki456 at hotmail dot com
also look at
this bug is _bogus_ because 1fff::a88:85a3:: is not a valid ipv6 address (TWO :: in it, that is NOT ALLOWED, see RFC4291)
please fix this.. ipv6 is coming fast
 [2009-07-10 18:38 UTC]
Felipe, since you fixed (?) that other (bogus?) report, please check 
this out too.. :)
 [2009-07-16 23:33 UTC]
Fixed with #48762. Thanks.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 22:01:29 2024 UTC