Ticket #1515 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: jamix Assigned to: skippy
Priority: normal Milestone:
Component: General Version: 1.5.1.2
Severity: normal Keywords: bg|has-patch bg|2nd-opinion
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

wp-mail.php.patch (11.9 kB) - added by jamix on 07/16/05 16:35:19.
The patch file for the wp-mail.php bug, WP 1.5.1.3

Change History

07/16/05 16:35:19 changed by jamix

  • attachment wp-mail.php.patch added.

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

08/10/05 02:42:07 changed by skippy

  • keywords set to bg|has-patch bg|2nd-opinion.
  • owner changed from anonymous to skippy.
  • status changed from new to assigned.
  • milestone set to 1.6.

11/14/05 11:38:16 changed by matt

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [3085]) Fixes #1515

11/30/06 19:41:47 changed by

  • milestone deleted.

Milestone 2.0 deleted