Skip to content

Commit 16ee79b

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@59967 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 173ee18 commit 16ee79b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/ms-files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
ms_file_constants();
2222

23-
if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) {
23+
if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) {
2424
status_header( 404 );
2525
die( '404 — File not found.' );
2626
}

0 commit comments

Comments
 (0)