Ticket #5169: wp-mail.php.3.diff
File wp-mail.php.3.diff, 852 bytes (added by , 17 years ago) |
---|
-
wp-mail.php
60 60 $subject = $subject[0]; 61 61 } 62 62 63 // Set the author using the email address ( Toor Reply-To, the last used)63 // Set the author using the email address (From or Reply-To, the last used) 64 64 // otherwise use the site admin 65 65 if ( preg_match('/(From|Reply-To): /', $line) ) { 66 $author = sanitize_email(preg_replace('/(From|Reply-To): /', '', $line)); 66 if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) ) 67 $author = $matches[0]; 68 else 69 $author = trim($line); 70 $author = sanitize_email($author); 67 71 if ( is_email($author) ) { 68 72 echo "Author = {$author} <p>"; 69 73 $author = $wpdb->escape($author);