Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/25/2019 02:24:26 PM (7 years ago)
Author:
boonebgorges
Message:

Activity: Improved capability checks when processing reply POSTs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r12365 r12371  
    10571057    }
    10581058
     1059    $activity_id   = (int) $_POST['form_id'];
     1060    $activity_item = new BP_Activity_Activity( $activity_id );
     1061    if ( ! bp_activity_user_can_read( $activity_item ) ) {
     1062        exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html( $feedback ) . '</p></div>' );
     1063    }
     1064
    10591065    $comment_id = bp_activity_new_comment( array(
    1060         'activity_id' => $_POST['form_id'],
     1066        'activity_id' => $activity_id,
    10611067        'content'     => $_POST['content'],
    10621068        'parent_id'   => $_POST['comment_id'],
Note: See TracChangeset for help on using the changeset viewer.