Skip to:
Content

BuddyPress.org

Changeset 12805


Ignore:
Timestamp:
11/26/2020 06:04:38 PM (4 years ago)
Author:
imath
Message:

Do nonce check the right way when handling activity comment replies

[12735] introduced a regression preventing users from replying to an activity comment. As we were using the wrong ID to build the nonce, the nonce check was failing during the new_activity_comment Ajax request.

Fixes #8403

Location:
trunk/src/bp-templates
Files:
2 edited

Legend:

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

    r12735 r12805  
    611611                action: 'new_activity_comment',
    612612                'cookie': bp_get_cookies(),
    613                 '_wpnonce_new_activity_comment': jq('#_wpnonce_new_activity_comment' + '_' + comment_id ).val(),
     613                '_wpnonce_new_activity_comment': jq('#_wpnonce_new_activity_comment' + '_' + form_id[2] ).val(),
    614614                'comment_id': comment_id,
    615615                'form_id': form_id[2],
  • trunk/src/bp-templates/bp-nouveau/js/buddypress-activity.js

    r12735 r12805  
    737737                comment_data = {
    738738                    action                        : 'new_activity_comment',
    739                     _wpnonce_new_activity_comment : $( '#_wpnonce_new_activity_comment' + '_' + item_id ).val(),
     739                    _wpnonce_new_activity_comment : $( '#_wpnonce_new_activity_comment' + '_' + activity_id ).val(),
    740740                    comment_id                    : item_id,
    741741                    form_id                       : activity_id,
Note: See TracChangeset for help on using the changeset viewer.