WordPress.org

Make WordPress Core

Changeset 6212


Ignore:
Timestamp:
10/09/2007 10:15:37 PM (11 years ago)
Author:
markjaquith
Message:

Properly sanitize e-mail addresses in wp-mail.php. Props giannis1. fixes #5169 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-mail.php

    r6125 r6212  
    6464            // otherwise use the site admin
    6565            if (preg_match('/From: /', $line) | preg_match('/Reply-To: /', $line))  {
    66                 $author=trim($line);
    67                 if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) {
    68                     $author = $regs[1];
     66                $author = sanitize_email($line);
     67                if ( is_email($author) ) {
    6968                    echo "Author = {$author} <p>";
    7069                    $author = $wpdb->escape($author);
Note: See TracChangeset for help on using the changeset viewer.