Edit report at https://bugs.php.net/bug.php?id=49180&edit=1

 ID:                 49180
 Updated by:         m...@php.net
 Reported by:        jmarois at ca dot ibm dot com
 Summary:            Add FILTER_VALIDATE_MAC and FILTER_SANITIZE_MAC
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Filter related
 Operating System:   Irrelevant
 PHP Version:        5.2.10
 Assigned To:        mj
 Block user comment: N
 Private report:     N

 New Comment:

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2012-12-26 10:46:47] m...@php.net

The correct PR is https://github.com/php/php-src/pull/247 actually.

------------------------------------------------------------------------
[2012-12-26 10:45:36] m...@php.net

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.

------------------------------------------------------------------------
[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

Reply via email to