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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mertloka at gmail dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 03:01:29 2024 UTC