From 2ff4db022b224d8759a7a00920e3757928ebc6df Mon Sep 17 00:00:00 2001 From: audrasjb Date: Tue, 11 Mar 2025 11:39:23 +0000 Subject: [PATCH] Media: Allow super-admin to access files of archived sites. This changeset fixes an issue in multisite installations where archived sites remain accessible to network administrators, but the associated files do not. The previous implementation was checking if the blog is archived, marked as spam, or deleted, to subsequently return a 404 error for file requests. However, this did not account for network administrators who should retain access to these files. Props antwortzeit, jeremyfelt, debarghyabanerjee, audrasjb. Fixes #36803. Built from https://develop.svn.wordpress.org/trunk@59967 git-svn-id: http://core.svn.wordpress.org/trunk@59309 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-files.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php index 42826ede61..a166d315aa 100644 --- a/wp-includes/ms-files.php +++ b/wp-includes/ms-files.php @@ -20,7 +20,7 @@ if ( ! is_multisite() ) { ms_file_constants(); -if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) { +if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) { status_header( 404 ); die( '404 — File not found.' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index f92aab7a28..f961f12db1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-beta1-59966'; +$wp_version = '6.8-beta1-59967'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.