Open kkarpieszuk opened 2 months ago
for time being here is a filter which bypass type checking for files .ddd|.DDD
when uploaded with WP Media uploader:
add_filter( 'wp_handle_upload_overrides', 'dont_test_ddd_mime_type', 10, 2 );
function dont_test_ddd_mime_type( $overrides, $file ) {
// check if the file is a .ddd or .DDD file.
if ( preg_match( '/\.ddd$/i', $file['name'] ) ) {
$overrides['test_type'] = false;
}
return $overrides;
}
For other places it could be a different hook, so if anyone see it is not working, please mention test steps and I will investigate.
CC @kennymacharia
Thank you @kkarpieszuk for the heads up. Linking the report below: https://wordpress.org/support/topic/plugin-not-working-correctly-with-php-8-3/
Steps:
foo/bar,text/xml
mime typesIt will be not uploaded because in the
FileUploadTypes\Plugin::allowed_types
we are removing other mime types and are using only the first one.This should be rewritten to something like:
The risk of this change is high, so it can not be added without caution