Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#1515 closed defect (bug) (fixed)

Bug in wp-mail.php preventing it from processing mails with subject lines in quoted-printable encoding

Reported by: jamix's profile jamix Owned by: skippy's profile skippy
Milestone: Priority: normal
Severity: normal Version: 1.5.1.2
Component: General Keywords: bg|has-patch bg|2nd-opinion
Focuses: Cc:

Description

Hey WP developers,

There's a bug in current wp-mail.php which prevents it from correctly processing e-mails with subjects in quoted-printable encoding. In lines 53-55, we have this:

if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $subject)) {
  $subject = wp_iso_descrambler($subject);
}

First of all, the regex check is incorrect - it should be

// No exclamation mark.
if (preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $subject)) {
  $subject = wp_iso_descrambler($subject);
}

Even more, however, - this regex check is unnecessary here, since it's done (correctly) in wp_iso_descrambler () anyway. So these three lines have to simply be replaced with:

$subject = wp_iso_descrambler($subject);

I've found this bug while experimenting with the blogging via e-mail feature. After the fix, everything works beautifully.

Thanks for the great product!

Attachments (1)

wp-mail.php.patch (11.9 KB) - added by jamix 19 years ago.
The patch file for the wp-mail.php bug, WP 1.5.1.3

Download all attachments as: .zip

Change History (4)

@jamix
19 years ago

The patch file for the wp-mail.php bug, WP 1.5.1.3

#1 @skippy
19 years ago

  • Keywords bg|has-patch bg|2nd-opinion added
  • Milestone set to 1.6
  • Owner changed from anonymous to skippy
  • Status changed from new to assigned

#2 @matt
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3085]) Fixes #1515

#3 @(none)
17 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.