Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/25/2019 02:12:34 PM (6 years ago)
Author:
boonebgorges
Message:

Activity: Ensure items can only be favorited by those with read access.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/activity/ajax.php

    r12354 r12365  
    9999    // Nonce check!
    100100    if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'bp_nouveau_activity' ) ) {
     101        wp_send_json_error();
     102    }
     103
     104    $activity_id   = (int) $_POST['id'];
     105    $activity_item = new BP_Activity_Activity( $activity_id );
     106    if ( ! bp_activity_user_can_read( $activity_item, bp_loggedin_user_id() ) ) {
    101107        wp_send_json_error();
    102108    }
Note: See TracChangeset for help on using the changeset viewer.