[buddypress-trac] [BuddyPress] #3280: Invalid URLs are incorrectly handled
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Jun 13 14:36:21 UTC 2011
#3280: Invalid URLs are incorrectly handled
----------------------+-----------------
Reporter: DJPaul | Owner:
Type: defect | Status: new
Priority: blocker | Milestone: 1.3
Component: Core | Version:
Resolution: | Keywords:
----------------------+-----------------
Comment (by boonebgorges):
Thanks for starting this, DJPaul. 3280-2.patch is an expanded version with
a few enhancements:
- Distinguish between groups that don't exist and groups that one does not
have access to. If you attempt to visit a non-existent group, or any
subpage of a non-existent group, you get a 404. If you attempt to visit
the inner page of a group to which you do not have access, you get
bp_core_no_access(), ie a redirect to the login page with a redirect_to
param. This will take care of the email notification issue without
resorting to putting the hideous wp-login.php url in emails :)
- http://example.com/members/INVALID/profile now 404s. I did this by
putting a check directly into bp_core_set_uri_globals(), where BP attempts
to find a displayed_user. This was tricky for components that also have
root component pages, like http://example.com/members/INVALID/groups,
because WP's canonical URL functions tried to "help" our 404 situation by
redirecting back to the similarly-named WP page with the name 'Groups'.
That's why you'll see
remove_action( 'template_redirect', 'redirect_canonical' );
in a few places.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3280#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list