Skip to content

Invalid filtering of IPv6 with FILTER_FLAG_NO_RES_RANGE  #16944

Closed
@nicolas-grekas

Description

@nicolas-grekas

Description

The following code:

var_dump(filter_var('::ffff:0:1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));

Resulted in this output:

string(10) "::ffff:0:1"

But I expected this output instead:

bool(false)

See https://3v4l.org/BF36t

PHP Version

Any

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions