Closed mcgratay closed 1 year ago
Would like to use this bug as an opportunity to better understand:
Particularly this claim:
Fixes issues related to #40175 that have been present since WordPress 4.7.1 https://core.trac.wordpress.org/ticket/40175
Additional file extensions to evaluate include:
For the nlogo issue, there's a Unizin bedrock plugin that allows a few extra mime types: https://github.com/pressbooks/wisc-bedrock/blob/master/web/app/mu-plugins/unizin-allow-upload-extensions.php. Not sure if it's no longer installed or has stopped working or if the issue is something else altogether.
Some context from the past: https://wpengine.com/support/non-image-upload-errors-wordpress-4-7-1/ + https://core.trac.wordpress.org/ticket/39550 + https://core.trac.wordpress.org/ticket/40175 (@greatislander was quite knowledgeable on these issues).
Would be happy to chat about this at some point, @SteelWagstaff, @connerbw & @mcgratay. The underlying issue hasn't been fully resolved in WordPress core and there are also nuances in terms of how the network admin whitelist interacts with uploaded file validation.
If "Lord of the files" is installed, and the Network Administrator wants to allow extra file extensions under Network Settings, and we can guess the mime type, then Upload File Types should work now.
Bonus: If SVGs have been enabled, "Lord of the files" will sanitize them at the upload stage to make sure they do not contain any dangerous exploits
LOTF can be installed on a network by running: composer require wpackagist-plugin/blob-mimes
It installs a debug menu that can only be seen by super-admins, or administrators (capability: manage_options
)
Description
Super admins should be able to whitelist file extensions across a whole network when that extension isn't already permitted by default. This prevents the "Sorry, this file type is not permitted for security reasons" notification that regular users receive when uploading disallowed file types.
This setting no longer works, and file extensions added and saved in the 'Upload file type' textbox are still banned across the network. Tested file types include:
Users report that nlogo file types were permitted when they began the project, but have since been resulting in the same security error.
Relevant threads:
Steps to Reproduce
Expected behavior: Super admins can choose which file types are permitted network-wide
Actual behavior: Only WordPress default file types are permitted network-wide