[wp-trac] [WordPress Trac] #36393: Loss of multibyte comment author names

WordPress Trac noreply at wordpress.org
Sun Apr 3 06:53:41 UTC 2016


#36393: Loss of multibyte comment author names
--------------------------+------------------------------
 Reporter:  cfinke        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by cfinke):

 Replying to [comment:2 azaozz]:
 > This is (more or less) taken care of in 4.5 by checking the submitted
 strings lengths, see #10377.

 Agreed that #10377 covers the situation I encountered. I had tested it in
 4.4 by actually doing the comment form submission, but when I tested it
 against trunk, I was using the code I had written to simulate the process,
 which didn't trigger those checks.

 This same bug is present in term creation (tested in trunk just now):
 create a tag or category with the name `AAAテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテ
 テテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテ` (201 bytes, destined for a 200-byte
 field). The category or tag will be created, but with a blank name. If you
 use the string `テテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテ
 テテテテテテテテAAA` (again 201 bytes, but with the 200th byte being a complete
 character), the name will be properly truncated to `テテテテテテテテテテテテテテテテテテテテテテ
 テテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテテAA` before creating the
 category.

 Here's my `wp_terms` structure:

 {{{
 CREATE TABLE `wp_terms` (
   `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `name` varchar(200) NOT NULL DEFAULT '',
   `slug` varchar(200) NOT NULL DEFAULT '',
   `term_group` bigint(10) NOT NULL DEFAULT '0',
   PRIMARY KEY (`term_id`),
   KEY `slug` (`slug`(191)),
   KEY `name` (`name`(191))
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36393#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list