Req #49180 [Opn->Asn]: Add FILTER_VALIDATE_MAC and FILTER_SANITIZE_MAC
Edit report at https://bugs.php.net/bug.php?id=49180&edit=1
ID: 49180
Updated by: mj@php.net
Reported by: jmarois at ca dot ibm dot com
Summary: Add FILTER_VALIDATE_MAC and FILTER_SANITIZE_MAC
-Status: Open
+Status: Assigned
Type: Feature/Change Request
Package: Filter related
Operating System: Irrelevant
PHP Version: 5.2.10
-Assigned To:
+Assigned To: mj
Block user comment: N
Private report: N
New Comment:
https://github.com/php/php-src/pull/246
implements FILTER_VALIDATE_MAC.
I'm not sure if a sanitizing filter for MAC addresses makes sense though.
Previous Comments:
------------------------------------------------------------------------
[2009-08-06 17:17:58] jmarois at ca dot ibm dot com
Description:
------------
About your Data Filters
************************************************************************
First the validation filters.
------------------------------------------------------------------------
You defined: FILTER_VALIDATE_EMAIL, FILTER_VALIDATE_IP and FILTER_VALIDATE_URL.
I request adding: FILTER_VALIDATE_MAC for MAC addresses, considering
(1) the six groups of two hexadecimal digits, separated by hyphens (-) or colons (:) format, and (2)
three groups of four hexadecimal digits separated by dots (.) format. Of course, not forgetting the
default of twelve hexadecimal digits.
Next the sanitizing filters.
------------------------------------------------------------------------
I request adding: FILTER_SANITIZE_MAC for MAC addresses, which would remove all characters except
hexadecimal digits.
Reproduce code:
---------------
---
From manual page: filter.filters.validate
---
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=49180&edit=1
Thread (4 messages)