Make WordPress Core

Changeset 6217


Ignore:
Timestamp:
10/10/2007 04:46:20 PM (17 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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>";
Note: See TracChangeset for help on using the changeset viewer.