Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17438

UTF-8 in mail display-name breaks bounce processing

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 4.4.13, 4.4.20
    • Fix Version/s: None
    • Component/s: CiviMail
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      When we send out mailings, we often enable tracking and forwarding of replies, so when somebody replies to the mailing it goes back through Civi and is forwarded on to the original sender. A few days ago, we received a reply that had UTF-8 characters in the person's "From" name ("display-name" according to RFC 2822 section 3.4).

      This caused the processing of our bounce mailbox, and in fact our whole Civi cron run, to repeatedly crash leaving errors in the web server log. Outbound mailings were also held up. Running cron from the command line with wget often gave 500 errors. The errors in the log started when the offending reply arrived. When I logged into the bounce mailbox this morning the offending reply was the oldest one present, and other later ones up to the present had not been processed. When I moved the reply out of the inbox, cron/bounce processing started working again.

      This was appearing in the site's nginx error log every time cron was run:

      2015/10/23 13:25:30 [error] 14762#0: *60375 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to a member function __toString() on a non-object in /var/www/html/prod/drupal-7.41/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Reply.php on line 140" while reading response header from upstream, client: <redacted>, server: <redacted>, request: "GET /sites/all/modules/civicrm/bin/cron.php?name=cron&pass=<redacted>&key=<redacted> HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "<redacted>"

      This occurs when CiviMail is attempting to put the address of the sender of the reply into the forwarded reply as a Reply-To when it forwards it on to the original sender of the mailing.

      The "From" line in the headers looked like:

      From: =?utf-8?B?0Y/OseKIgs65zrnOsSDQvc6xcc+F0ZQn4pmlIOODhA==?=
      	<redacted@redacted.co.uk>
      

      This particular occurrence I think was a young person trying to make their display name stand out, but it might be more of a problem for installations in countries with non-Latin alphabets?

      Thanks,
      Dave

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              DaveFF David Knoll
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: