Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c44fb24
fix: updated qs to 6.15.0
the-hercules Feb 20, 2026
dffc704
Merge pull request #2294 from rtCamp/update/packages
vishalkakadiya Feb 20, 2026
e37a6cd
fix: add minimatch override to 10.2.1 in package.json
the-hercules Feb 20, 2026
d178914
chore: qs security patched in 6.14.2 ran npm update qs to update the …
the-hercules Feb 20, 2026
a83fc11
chore: axios security patched in 1.13.5 ran npm update axios to updat…
the-hercules Feb 20, 2026
42be6bc
fix: update fast-xml-parser to version 5.3.7 and add it to overrides …
the-hercules Feb 20, 2026
0a04cd6
fix: update ajv to version 8.18.0 and add it to overrides in package.…
the-hercules Feb 20, 2026
d6d83e3
Merge pull request #2295 from rtCamp/update/packages
vishalkakadiya Feb 20, 2026
b00061e
fix: temporarily disable e2e test job due to security dependency updates
the-hercules Feb 23, 2026
2d9d85e
fix: update webpack-dev-server version specification in package.json
the-hercules Feb 23, 2026
8866890
fix: remove deprecated packages and update dependencies in package-lo…
the-hercules Feb 23, 2026
c087856
Merge branch 'develop' into fix/dependabot-issue
the-hercules Feb 23, 2026
040b578
fix: remove unused dependencies from package-lock.json
the-hercules Feb 23, 2026
b0fc486
Merge pull request #2296 from rtCamp/fix/dependabot-issue
the-hercules Feb 23, 2026
4aa312c
fix: update basic-ftp version in package.json
the-hercules Feb 27, 2026
9282dec
Merge pull request #2304 from rtCamp/fix/dependabot-issue
the-hercules Feb 27, 2026
3c78a3d
fix: update minimatch version and clean up package-lock.json
the-hercules Mar 2, 2026
3862dd5
Merge pull request #2305 from rtCamp/fix/dependabot-issue
the-hercules Mar 2, 2026
d539e42
Remove wp-e2e-playwright folder to fix Dependabot errors
Mar 5, 2026
58dffc6
Merge pull request #2311 from rtCamp/chore/update-immutable-transitiv…
mi5t4n Mar 5, 2026
0178ebd
Merge pull request #2313 from rtCamp/remove-e2e-tests-dependabot-error
IndiraBiswas Mar 5, 2026
132902b
chore(deps): bump picomatch
dependabot[bot] Mar 25, 2026
308538d
Merge pull request #2318 from rtCamp/dependabot/npm_and_yarn/multi-bf…
the-hercules Apr 2, 2026
02091c8
fix: update lodash version to 4.18.1 in package-lock.json and add lod…
the-hercules Apr 2, 2026
0972190
Merge branch 'develop' into fix/security-issues-lodash
the-hercules Apr 2, 2026
6f58a96
Merge pull request #2319 from rtCamp/fix/security-issues-lodash
the-hercules Apr 2, 2026
1262193
Fix: add authorization checks for media deletion
krishana7911 Apr 6, 2026
93bf771
Update: removed comment
krishana7911 Apr 6, 2026
55d9c92
Merge pull request #2321 from rtCamp/fix/media-delete-permissions
krishana7911 Apr 6, 2026
3913311
Version update v4.7.10
krishana7911 Apr 7, 2026
cb319a6
Update changelog.txt with version release details
krishana7911 Apr 7, 2026
605311a
Updated pot file
krishana7911 Apr 7, 2026
42fbbe0
Merge pull request #2322 from rtCamp/version-update/v4.7.10
krishana7911 Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ permissions:

jobs:
Run-wpe2e-TestCase:
# Temporarily disabled due to security dependency updates
# TODO: Re-enable after resolving test failures with updated Playwright and dependencies
if: false
# The type of runner that the job will run on
name: Run rtMedia Features Test Cases
runs-on: ubuntu-latest
env:
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./tests/wp-e2e-playwright

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ https://www.youtube.com/watch?v=dJrykKQGDcs

## Changelog ##

### 4.7.10
* FIXED
* Improved authorization checks for media deletion to ensure only permitted users can delete media.

### 4.7.9

* FIXED
Expand Down
44 changes: 42 additions & 2 deletions app/main/controllers/template/rtmedia-ajax-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* Delete uploaded media.
* Modified 10-02-2019 by Adarsh Verma <adarsh.verma@rtcamp.com>
* Patched to include Ownership and Authorization checks.
*/
function rtmedia_delete_uploaded_media() {

Expand All @@ -17,6 +17,47 @@ function rtmedia_delete_uploaded_media() {

if ( ! empty( $action ) && 'delete_uploaded_media' === $action && ! empty( $media_id ) ) {
if ( wp_verify_nonce( $nonce, 'rtmedia_' . get_current_user_id() ) ) {

$model = new RTMediaModel();
$media = $model->get( array( 'id' => $media_id ) );

// Check if media exists
if ( empty( $media ) || ! isset( $media[0] ) ) {
wp_send_json_error(
array(
'code' => 'rtmedia-media-not-found',
'message' => esc_html__( 'Media not found.', 'buddypress-media' ),
)
);
wp_die();
}

$current_user_id = get_current_user_id();
$media_author = (int) $media[0]->media_author;

// 1. Is the user the owner of the media?
$is_owner = ( $current_user_id === $media_author );

// 2. Is the user a site administrator?
$is_admin = current_user_can( 'manage_options' ) || current_user_can( 'delete_others_posts' );

// 3. Is the user a BuddyPress Group Admin? (if the media belongs to a BP group)
$is_group_admin = false;
if ( ! empty( $media[0]->context ) && 'group' === $media[0]->context && function_exists( 'groups_is_user_admin' ) ) {
$is_group_admin = groups_is_user_admin( $current_user_id, $media[0]->context_id );
}

// If none of the above are true, block the deletion
if ( ! $is_owner && ! $is_admin && ! $is_group_admin ) {
wp_send_json_error(
array(
'code' => 'rtmedia-unauthorized',
'message' => esc_html__( 'You do not have permission to delete this media.', 'buddypress-media' ),
)
);
wp_die();
}

$remaining_album = 0;
$remaining_photos = 0;
$remaining_music = 0;
Expand All @@ -29,7 +70,6 @@ function rtmedia_delete_uploaded_media() {
if ( class_exists( 'RTMediaNav' ) ) {
global $bp;
$rtmedia_nav_obj = new RTMediaNav();
$model = new RTMediaModel();
$other_count = 0;

if ( function_exists( 'bp_is_group' ) && bp_is_group() ) {
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
== Changelog ==

= 4.7.10 [April 07, 2026] =

* FIXED
* Improved authorization checks for media deletion to ensure only permitted users can delete media.

= 4.7.9 [January 30, 2026] =

* FIXED
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
* Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
* Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
* Version: 4.7.9
* Version: 4.7.10
* Requires at least: 4.1
* Text Domain: buddypress-media
* Author: rtCamp
Expand All @@ -22,7 +22,7 @@
/**
* The version of the plugin
*/
define( 'RTMEDIA_VERSION', '4.7.9' );
define( 'RTMEDIA_VERSION', '4.7.10' );
}

if ( ! defined( 'RTMEDIA_PATH' ) ) {
Expand Down
Loading
Loading