[wp-trac] [WordPress Trac] #19549: Please remove X-Mailer from class-phpmailer

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 14 20:37:15 UTC 2011


#19549: Please remove X-Mailer from class-phpmailer
--------------------------+-----------------------------
 Reporter:  jwz           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Mail          |    Version:  3.3
 Severity:  minor         |   Keywords:
--------------------------+-----------------------------
 It is nobody's business what software I am using to send mail, or what
 version number it is. Providing version numbers of server-side packages to
 strangers is an unnecessary security exposure.  With each update to
 WordPress, I apply this patch.  I would appreciate it if you would either
 include this patch yourselves, or provide a hook where I can do this
 myself without modifying the source.


 {{{
 --- wp-includes/class-phpmailer.php     5 Jul 2011 20:53:19 -0000
 1.3
 +++ wp-includes/class-phpmailer.php     14 Dec 2011 19:43:32 -0000
 @@ -1129,8 +1129,8 @@
      } else {
        $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id,
 $this->ServerHostname(), $this->LE);
      }
 -// jwz: no.    $result .= $this->HeaderLine('X-Priority',
 $this->Priority);
 -// jwz: no.    $result .= $this->HeaderLine('X-Mailer', 'PHPMailer
 (phpmailer.sourceforge.net) [version ' . $this->Version . ']');
 +    $result .= $this->HeaderLine('X-Priority', $this->Priority);
 +    $result .= $this->HeaderLine('X-Mailer', 'PHPMailer
 '.$this->Version.' (phpmailer.sourceforge.net)');

      if($this->ConfirmReadingTo != '') {
        $result .= $this->HeaderLine('Disposition-Notification-To', '<' .
 trim($this->ConfirmReadingTo) . '>');

 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19549>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list