[buddypress-trac] [BuddyPress Trac] #6977: Audit all DB fetch methods to return integers where appropriate

buddypress-trac noreply at wordpress.org
Tue Jun 28 05:24:26 UTC 2016


#6977: Audit all DB fetch methods to return integers where appropriate
------------------------------------+-----------------------------
 Reporter:  r-a-y                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Core                    |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------------

Comment (by r-a-y):

 In [changeset:"10907"]:
 {{{
 #!CommitTicketReference repository="" revision="10907"
 Activity: Fix issue with activity permalink access when the legacy
 activity query is enabled.

 In #7113, we fixed a bug where anybody's activity item could be displayed
 under a member profile.  The fix (r10880) does a strict type check on
 `$activity->user_id`.

 We expect `$activity->user_id` to be an integer, however it can be a
 numeric string if the legacy activity query is enabled with:
 `add_filter( 'bp_use_legacy_activity_query', '__return_true' );`

 Since the check will always fail in this instance, members will not be
 able
 to access activity permalinks.

 We unfortunately missed this specific instance in r10853.

 This commit addresses this problem.

 See #6977. Fixes #7146 (2.6-branch).
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6977#comment:15>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list