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

Inserting an emoji in PM subject field causes errors

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.2.2
    • Fix Version/s: None
    • Component/s: Private Messages (PM)
    • Labels:
      None
    • Environment:
      PHP 7.1.16 - MySQL(i) 10.1.30-MariaDB - FF 61.0.1 (64-bit) and MS Edge 42.17134.1.0

      Description

      Inserting an emoji in a PM subject field causes errors, it only happens when you submit, preview is ok. Normal smilies work as expected by not allowing a smilie to go in the subject line.

      At phpbb.com I get: 

      General Error
       SQL ERROR [ mysqli ]
       
       Incorrect string value: '\xF0\x9F\x87\xA9\xF0\x9F...' for column 'message_subject' at row 1 [1366]
       
       An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

       

      On my test board I see: 

      General Error
       SQL ERROR [ mysqli ]
       
       Incorrect string value: '\xF0\x9F\x98\x8E' for column 'message_subject' at row 1 [1366]
       
       SQL
       
       INSERT INTO phpbb_privmsgs (root_level, author_id, icon_id, author_ip, message_time, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, message_subject, message_text, message_attachment, bbcode_bitfield, bbcode_uid, to_address, bcc_address, message_reported) VALUES (0, '2', 0, '2a00:23c5:5302:8500:8c10:d8dc:20d:29f6', 1530174101, 1, 1, 1, 1, '', '<t>Test</t>', 0, '', '271uu31s', 'u_2', '', 0)
       
       BACKTRACE
       
       FILE: (not given by php)
       LINE: (not given by php)
       CALL: msg_handler()
       
       FILE: [ROOT]/phpbb/db/driver/driver.php
       LINE: 996
       CALL: trigger_error()
       
       FILE: [ROOT]/phpbb/db/driver/mysqli.php
       LINE: 193
       CALL: phpbb\db\driver\driver->sql_error()
       
       FILE: [ROOT]/phpbb/db/driver/factory.php
       LINE: 329
       CALL: phpbb\db\driver\mysqli->sql_query()
       
       FILE: [ROOT]/includes/functions_privmsgs.php
       LINE: 1771
       CALL: phpbb\db\driver\factory->sql_query()
       
       FILE: [ROOT]/includes/ucp/ucp_pm_compose.php
       LINE: 858
       CALL: submit_pm()
       
       FILE: [ROOT]/includes/ucp/ucp_pm.php
       LINE: 108
       CALL: compose_pm()
       
       FILE: [ROOT]/includes/functions_module.php
       LINE: 676
       CALL: ucp_pm->main()
       
       FILE: [ROOT]/ucp.php
       LINE: 394
       CALL: p_master->load_active()

       

      I've only tested this with 3.2.2.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Mick Mick
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: