Closed ColinFrick closed 1 year ago
@ColinFrick: Which plugin called wp_delete_file with an empty string? I'd like to know because I will only trigger a release on wordpress.org if it is a popular plugin
Hey @rosell-dk Thanks for the merge
The plugin Lumise called wp_delete_file with an empty string: https://lumise.com/ https://codecanyon.net/item/lumise-product-designer-woocommerce-wordpress/21222684
When wp_delete_file is called, the hook does not validate the given filename.
We had the problem, that a plugin called wp_delete_file with an empty string. This caused this hook to fail, because exif_imagetype used by the Mime class does not handle empty strings.
I call
SanityCheck::absPathExistsAndIsFileInDocRoot
at the beginning of the function, becauseHandleUploadHooks
validates it the same way.