[wp-trac] [WordPress Trac] #18923: Publish by email stuck in Pending status

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 23 04:34:50 UTC 2011


#18923: Publish by email stuck in Pending status
-------------------------------------+------------------------------
 Reporter:  bloggertype              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Mail                     |     Version:  3.2.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------
Changes (by solarissmoke):

 * keywords:  reporter-feedback => has-patch needs-testing


Comment:

 I think I've tracked this down. The problem is the following regex in wp-
 mail.php:

 {{{
 preg_match('/(From|Reply-To): /', $line)
 }}}

 This also matches `In-Reply-To:` headers because it doesn't check for the
 start of the line. And because of the way the logic works, if an `In-
 Reply-To:` header comes after a `From:` header, then the author gets
 overwritten (regardless of whether the author is identifiable as a user),
 and then the post goes into pending status.

 Patch fixes the regex, also removes some redundant `else` blocks.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18923#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list