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-activity/actions/reply.php

    r11885 r12371  
    4545    }
    4646
     47    $activity_item = new BP_Activity_Activity( $activity_id );
     48    if ( ! bp_activity_user_can_read( $activity_item ) ) {
     49        bp_core_add_message( __( 'There was an error posting that reply. Please try again.', 'buddypress' ), 'error' );
     50        bp_core_redirect( wp_get_referer() . '#ac-form-' . $activity_id );
     51    }
     52
    4753    $comment_id = bp_activity_new_comment( array(
    4854        'content'     => $content,
Note: See TracChangeset for help on using the changeset viewer.