Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-17058

Special character issue in emails from PHP 8.0 and higher

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.3.9-RC1
    • 3.3.9
    • Template Engine
    • None

    Description

      With PHP 7.4 and lower this kind of Line endings works fine:
      \phpBB\includes\functions_messenger.php

       $encode_eol = ($config['smtp_delivery']) ? "\r\n" : PHP_EOL;
      

      Which leads to "\n" als $eol.

      From PHP 8.0 this needs to "\r\n" for e-mails or the headers will leads to problems with special characters like äöü or other UTF-8 characters.

      Suggested solution

      $encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;
      

      Attachments

        Activity

          People

            Crizzo Crizzo
            Crizzo Crizzo
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: