Make WordPress Core

Ticket #5169: wp-mail.php.diff

File wp-mail.php.diff, 694 bytes (added by markjaquith, 17 years ago)
  • wp-mail.php

     
    6464                        // otherwise use the site admin
    6565                        if (preg_match('/From: /', $line) | preg_match('/Reply-To: /', $line))  {
    6666                                $author=trim($line);
    67                                 if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) {
    68                                         $author = $regs[1];
     67                                if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+|i', $author, $matches) ) {
     68                                        $author = $matches[0];
    6969                                        echo "Author = {$author} <p>";
    7070                                        $author = $wpdb->escape($author);
    7171                                        $result = $wpdb->get_row("SELECT ID FROM $wpdb->users WHERE user_email='$author' LIMIT 1");