php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70807 filter_var
Submitted: 2015-10-28 15:29 UTC Modified: 2015-11-08 04:22 UTC
From: mertloka at gmail dot com Assigned:
Status: No Feedback Package: filter (PECL)
PHP Version: 5.4Git-2015-10-28 (Git) OS: ubuntu
Private report: No CVE-ID: None
 [2015-10-28 15:29 UTC] mertloka at gmail dot com
Description:
------------
$ip = "::ffff:0:10.0.0.3";
if (!filter_var($ip, FILTER_VALIDATE_IP) === false) {
    echo("$ip is a valid IP address");
} else {
    echo("$ip is not a valid IP address");
}

this return invalid also it is valid

Test script:
---------------
$ip = "::ffff:0:10.0.0.3";
if (!filter_var($ip, FILTER_VALIDATE_IP) === false) {
    echo("$ip is a valid IP address");
} else {
    echo("$ip is not a valid IP address");
}

this return invalid also it is valid


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-28 17:46 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2015-10-28 17:46 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

https://3v4l.org/534p6
 [2015-10-28 17:47 UTC] requinix@php.net
-Package: *Network Functions +Package: filter
 [2015-11-08 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC