[wp-trac] [WordPress Trac] #10377: Comment fields should have max lengths

WordPress Trac noreply at wordpress.org
Wed Jan 13 01:24:48 UTC 2016


#10377: Comment fields should have max lengths
-------------------------------------------------+-------------------------
 Reporter:  muriloazevedo                        |       Owner:
     Type:  defect (bug)                         |  rachelbaker
 Priority:  normal                               |      Status:  closed
Component:  Comments                             |   Milestone:  4.5
 Severity:  normal                               |     Version:  2.8
 Keywords:  has-patch has-unit-tests dev-        |  Resolution:  fixed
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------
Changes (by rachelbaker):

 * owner:   => rachelbaker
 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36272"]:
 {{{
 #!CommitTicketReference repository="" revision="36272"
 Comments: Restrict the maximum characters for input fields within the
 comments template.

 Added hardcoded maxlength attributes on the author, author_email,
 author_url, and comment_field input markup. These can be modified via the
 comment_form_defaults filter. Added logic in
 wp_handle_comment_submission() to return a WP_Error when the
 comment_author, comment_author_url, or comment_content values exceed the
 max length of their columns. Introduces wp_get_comment_column_max_length()
 which returns the max column length for a given column name, and is
 filterable. Unit tests included for the error conditions in
 wp_handle_comment_submission()

 Fixes #10377.

 Props westonruter rachelbaker.
 }}}

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


More information about the wp-trac mailing list