[wp-trac] [WordPress Trac] #16867: Where is it appropriate to use filter_var

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 11 21:20:22 UTC 2011


#16867: Where is it appropriate to use filter_var
-------------------------------------+-----------------------------
 Reporter:  aaroncampbell            |       Owner:
     Type:  enhancement              |      Status:  reopened
 Priority:  normal                   |   Milestone:  Future Release
Component:  General                  |     Version:  3.2
 Severity:  normal                   |  Resolution:
 Keywords:  westi-likes needs-patch  |
-------------------------------------+-----------------------------
Changes (by westi):

 * keywords:  2nd-opinion => westi-likes needs-patch
 * status:  closed => reopened
 * version:   => 3.2
 * resolution:  maybelater =>
 * milestone:   => Future Release


Comment:

 I think we can consider using this for a few small situations where it is
 likely to be safe and stable to use and gives better performance than our
 current solutions:

  * IP Address filtering - faster than the regular expression based
 solution we have now
  * is_email - better coverage than our current solution.

 If someone was to create a patch for this that would be great - this
 includes creating a new IP address sanitisation wrapper function to
 replace the duplicated preg_ code we have at the moment.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16867#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list