Bug #81332 [NEW]: urn: URIs are not validated properly

From: Date: Thu, 05 Aug 2021 07:00:28 +0000
Subject: Bug #81332 [NEW]: urn: URIs are not validated properly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235603@lists.php.net to get a copy of this message
From:             tamas dot nagy0404 at outlook dot com
Operating system: all
PHP version:      Irrelevant
Package:          URL related
Bug Type:         Bug
Bug description:urn: URIs are not validated properly

Description:
------------
Hi,

Looks like the filter_var('urn:isbn:0451450523', FILTER_VALIDATE_URL);
function does not validate the urn: type of URIs properly.

The "urn:" type of URIs are mentioned by
http://www.faqs.org/rfcs/rfc2396.html however
the function just marks as
invalid whereas it should validate it according to
http://www.faqs.org/rfcs/rfc2141.html that is
referenced from the
RFC2396. 

Related comment:
https://www.php.net/manual/en/filter.filters.validate.php#110411

Tests: https://3v4l.org/SOd9X#veol

Test script:
---------------
https://3v4l.org/SOd9X#veol

Expected result:
----------------
I would expect to validate urn: URIs to be validated properly according
to http://www.faqs.org/rfcs/rfc2141.html


-- 
Edit bug report at https://bugs.php.net/bug.php?id=81332&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81332&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81332&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81332&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81332&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81332&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81332&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81332&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81332&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81332&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81332&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81332&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81332&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81332&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81332&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81332&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81332&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81332&r=mysqlcfg


Thread (5 messages)

« previous php.bugs (#235603) next »