Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15897

Unicode Characters in Attachment Comment Causes mySQL Error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.2.8-RC1
    • 3.2.4
    • 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)

      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 *** ***

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

            Marc Marc
            cprgolds cprgolds [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: