[wp-trac] [WordPress Trac] #38477: Missing validation while posting comment via REST API

WordPress Trac noreply at wordpress.org
Mon Oct 24 23:47:47 UTC 2016


#38477: Missing validation while posting comment via REST API
--------------------------+--------------------
 Reporter:  mangeshp      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------

Comment (by dd32):

 [attachment:38477.diff] should use `>` rather than `<` to improve
 readability.

 `if ( strlen( $something ) > $max_length )` is more readable than ` if (
 $max_length < strlen( $something ) )`

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


More information about the wp-trac mailing list