Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

#5207 closed defect (bug) (fixed)

Viewing a spammed user's page if not a moderator adds a trailing 'members' slug to URL

Reported by: r-a-y Owned by: r-a-y
Milestone: 1.9 Priority: normal
Severity: normal Version: 1.6
Component: Members Keywords: has-patch
Cc:

Description

Just encountered this bug.

Steps to duplicate:

  1. Make sure you have marked a user as a spammer. Next, either log out or login as a non-admin.
  2. Try to view the spammed user's profile.
  3. The URL will show - domain.com/members/SPAMMER/members/

I've attached a quick patch that fixes this by unsetting the component in the canonical stack if the displayed user is a spammer and if the current user does not have the 'bp_moderate' cap.

Attachments (1)

5207.01.patch (894 bytes) - added by r-a-y 7 years ago.

Download all attachments as: .zip

Change History (3)

@r-a-y
7 years ago

#1 @boonebgorges
7 years ago

Yup, this looks like the right place to fix the issue.

#2 @r-a-y
7 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 7456:

Fix trailing 'members' slug when non-admins view a spammer's profile.

If we're on a spammer's profile page, only users with the 'bp_moderate'
cap can view subpages on the spammer's profile.

Users without the cap trying to access a spammer's subnav page should be
redirected to the root of the spammer's profile page.

This commit does this by removing the component in the canonical stack
when a user without the 'bp_moderate' cap is on a spammer's profile page.

Fixes #5207.

Note: See TracTickets for help on using tickets.