Title: Bugfix: Version 3.2.7, Upload files restriction
Last modified: January 22, 2019

---

# Bugfix: Version 3.2.7, Upload files restriction

 *  Resolved [miux](https://wordpress.org/support/users/miux/)
 * (@miux)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/bugfix-upload-files-restriction/)
 * Ladies and Gentlemen
 * we encountered a bug while uploading a file type (exe) that doesn’t seem to be
   supported with your plugin even though it’s enabled via wordpress core
    (wordpress
   capability unfiltered_upload).
 * **Issue:**
    Plugin Version: 3.2.7 Replace File type: exe “File type does not 
   meet security guidelines. Try another.”, ‘enable-media-replace’
 * **Bugfix:**
    Remove line 230-233. Allowed file types are already being checked
   by wordpress core function ‘wp_check_filetype_and_ext’
 * File: upload.php
    Line: 227 – 233 Function:
 *     ```
       	// New method for validating that the uploaded file is allowed, using WP:s internal wp_check_filetype_and_ext() function.
       	$filedata = wp_check_filetype_and_ext($_FILES["userfile"]["tmp_name"], $_FILES["userfile"]["name"]);
   
       	if ($filedata["ext"] == "") {
       		echo esc_html__("File type does not meet security guidelines. Try another.", 'enable-media-replace');
       		exit;
       	}
       ```
   
    -  This topic was modified 7 years, 3 months ago by [miux](https://wordpress.org/support/users/miux/).
    -  This topic was modified 7 years, 3 months ago by [miux](https://wordpress.org/support/users/miux/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [ShortPixel](https://wordpress.org/support/users/shortpixel/)
 * (@shortpixel)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/bugfix-upload-files-restriction/#post-11120388)
 * Thanks for letting us know about this issue, we’ll look into it and possibly 
   address it with the next plugin update.
 * Regards,
    Alex
 *  Plugin Author [ShortPixel](https://wordpress.org/support/users/shortpixel/)
 * (@shortpixel)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/bugfix-upload-files-restriction/#post-11148691)
 * [@miux](https://wordpress.org/support/users/miux/) thank you for your fix, it
   was included in the latest plugin update! 🙂
 *  Thread Starter [miux](https://wordpress.org/support/users/miux/)
 * (@miux)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/bugfix-upload-files-restriction/#post-11148702)
 * [@shortpixel](https://wordpress.org/support/users/shortpixel/) you’re welcome!
   It has been a pleasure contributing to your amazing plugin! Thank you for your
   hard work and dedication! 🙂
    -  This reply was modified 7 years, 3 months ago by [miux](https://wordpress.org/support/users/miux/).
 *  [fhfournier](https://wordpress.org/support/users/fhfournier/)
 * (@fhfournier)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/bugfix-upload-files-restriction/#post-11149125)
 * Still not working.
 * [https://wordpress.org/support/topic/file-type-does-not-meet-security-guidelines-try-another-3/](https://wordpress.org/support/topic/file-type-does-not-meet-security-guidelines-try-another-3/)
    -  This reply was modified 7 years, 3 months ago by [fhfournier](https://wordpress.org/support/users/fhfournier/).
    -  This reply was modified 7 years, 3 months ago by [fhfournier](https://wordpress.org/support/users/fhfournier/).
    -  This reply was modified 7 years, 3 months ago by [fhfournier](https://wordpress.org/support/users/fhfournier/).
    -  This reply was modified 7 years, 3 months ago by [fhfournier](https://wordpress.org/support/users/fhfournier/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Bugfix: Version 3.2.7, Upload files restriction’ is closed to new replies.

 * ![](https://ps.w.org/enable-media-replace/assets/icon-256x256.png?rev=1940728)
 * [Enable Media Replace](https://wordpress.org/plugins/enable-media-replace/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enable-media-replace/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enable-media-replace/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-media-replace/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-media-replace/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-media-replace/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [fhfournier](https://wordpress.org/support/users/fhfournier/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/bugfix-upload-files-restriction/#post-11149125)
 * Status: resolved