Repository navigation
Conversation
… on multisite settings save
…nscoding survey response
…group upload directory
…an_read on activity comments
Contributor
|
Unable to PHPCS or SVG scan one or more files due to error running PHPCS/SVG scanner:
The error may be temporary. If the error persists, please contact a human (commit-ID: 8903bb2). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies targeted security hardening and access-control fixes across core rtMedia components to align with WordPress security best practices.
Key Changes
Access Control & Permissions:
rtmedia_current_user_can_manage_media()check inRTMediaTemplate::single_delete()before deletion, preventing unauthorized deletion of other users' media.current_user_can( 'manage_network_options' )andcheck_admin_referer()insave_multisite_options().manage_optionscapability checks for option updates onadmin_initand migration notice dismissals.rtmedia_user_can_view_activity()for activity comments.Privacy Boundary Enforcement:
RTMediaQuery::privacy_filter()so that media belonging to private BuddyPress groups (privacy = 20) is only queryable by active group members (groups_get_user_groups()).$wherefrom being reset to an empty string.Authentication & Rate Limiting:
wp_forgot_passwordJSON API response to a uniform success payload (status_code: 500003) regardless of whether the account exists, preventing username/email harvesting.RTMediaApiRateLimiterwith dedicated reset bucket keys to prevent email flooding without impacting regular login attempts.Input Sanitization & Injection Prevention:
user_id,comment_author, andcomment_post_IDdirectly to the authenticated session and route in the web template, strictly allowlisting attributes passed towp_insert_comment().RTMediaModel::get_counts()with anrtmedia_allowed_counts_columnsextensibility filter to prevent identifier injection.context_idto integer viaabsint()in group upload handling to eliminate path traversal risks.<optgroup>markup inrtMedia.jsand regeneratedrtmedia.min.js.Verification & Testing
AI Usage
Hermes with Gemini Flash 3.8 (High) and an agentic review loop via headless DeepSeek Harness on DeepSeek-V4.1-Flash (High Effort).
I have ensured to manually validate and fix all changes accordingly.