Changeset 6217

Show
Ignore:
Timestamp:
10/10/07 16:46:20 (1 year ago)
Author:
markjaquith
Message:

Strip From/Reply-To from e-mail before sanitizing in wp-mail.php. Props Bobcat. fixes #5169

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-mail.php

    r6212 r6217  
    6363            // Set the author using the email address (To or Reply-To, the last used) 
    6464            // otherwise use the site admin 
    65             if (preg_match('/From: /', $line) | preg_match('/Reply-To: /', $line))  { 
    66                 $author = sanitize_email($line); 
     65            if ( preg_match('/(From|Reply-To): /', $line) )  { 
     66                $author = sanitize_email(preg_replace('/(From|Reply-To): /', '', $line)); 
    6767                if ( is_email($author) ) { 
    6868                    echo "Author = {$author} <p>";