[wp-trac] [WordPress Trac] #11286: Normal User Input Causes Status 500

WordPress Trac noreply at wordpress.org
Tue Nov 18 14:10:38 UTC 2014


#11286: Normal User Input Causes Status 500
------------------------------+--------------------
 Reporter:  miqrogroove       |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.1
Component:  Comments          |     Version:  2.8.4
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+--------------------

Comment (by mdgl):

 OK, after pretending to be Sergey for a bit I discovered we already have
 #14452, #16979 and #18630 related to the issue I'm raising.

 I started creating a fix adopting the idiom used by
 `wp_set_comment_status()` which enables the optional return of a
 `WP_Error` object rather than dying. This works for `wp_new_comment()` and
 `wp_allow_comment()` but unfortunately not for `check_comment_flood_db()`
 which is called indirectly via an action (yech - who thought *that* was a
 good idea?). Apart from using an ugly global variable, it's unclear how to
 enable the behaviour of that function to be modified and for it to return
 an error message whilst preserving complete backward compatibility.

 A more wholesale cleanup of the comments subsystem should surely be on the
 cards for a future 4.x release!

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


More information about the wp-trac mailing list