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

Unicode Characters in Attachment Comment Causes mySQL Error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 3.2.4
    • 3.2.8-RC1
    • Attachments
    • PHP 7.0.25
      Server type: Percona Server
      Server version: 5.6.41-84.1 - Percona Server (GPL), Release 84.1, Revision b308619
      Chrome Version 70.0.3538.110 (Official Build) (64-bit)

    Description

      When a user enters a unicode character (which can be done using the emoji panel in Win 10) into an attachments comment field, a SQL error is caused.

      Entering the unicode character in the text of the post works fine.

      SQL ERROR [ mysqli]
      Incorrect string value: '\xF0\x9F\x91\x8C\xF0\x9F...' for column 'attach_comment' at row 1 [1366]
       
      SQL
      UPDATE phpbb_attachments SET post_msg_id = 1390, topic_id = 115, is_orphan = 0, poster_id = 2, attach_comment = '*** ***' WHERE attach_id = 84 AND is_orphan = 1 AND poster_id = 2
      

       *** ***  - Issue won't post with characters from error message.  Substituted *** ***

      Attachments

        1. Preview.PNG
          Preview.PNG
          156 kB
        2. comment_panel.PNG
          comment_panel.PNG
          19 kB

        Activity

          People

            Marc Marc
            cprgolds cprgolds
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: