Skip to:
Content

bbPress.org

Changeset 3286


Ignore:
Timestamp:
06/01/2011 01:37:23 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Prevent poisoning of forum/topic/reply data when marking posts as trash/spam. Fixes issue where anonymous user data would get purged when post status was changed from an admin area post-row.

Location:
branches/plugin/bbp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-admin/bbp-forums.php

    r3243 r3286  
    232232            return $forum_id;
    233233
     234        // Bail if not a post request
     235        if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
     236            return $forum_id;
     237
    234238        // Bail if current user cannot edit this forum
    235239        if ( !current_user_can( 'edit_forum', $forum_id ) )
  • branches/plugin/bbp-admin/bbp-replies.php

    r3274 r3286  
    227227            return $reply_id;
    228228
     229        // Bail if not a post request
     230        if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
     231            return $reply_id;
     232
    229233        // Current user cannot edit this reply
    230234        if ( !current_user_can( 'edit_reply', $reply_id ) )
     
    298302        // Bail if no post_id
    299303        if ( empty( $post_id ) )
     304            return $post_id;
     305
     306        // Bail if not a post request
     307        if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    300308            return $post_id;
    301309
  • branches/plugin/bbp-admin/bbp-topics.php

    r3260 r3286  
    255255            return $topic_id;
    256256
     257        // Bail if not a post request
     258        if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
     259            return $topic_id;
     260
    257261        // Bail if current user cannot edit this topic
    258262        if ( !current_user_can( 'edit_topic', $topic_id ) )
     
    328332        // Bail if doing an autosave
    329333        if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
     334            return $post_id;
     335
     336        // Bail if not a post request
     337        if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    330338            return $post_id;
    331339
Note: See TracChangeset for help on using the changeset viewer.