• Resolved aljohn23wordpress

    (@aljohn23wordpress)


    Is it possible to setup the plugin so all file extensions can be uploaded? The page I use this plugin is wordpress password protected so I am not concerned any bad extensions will get uploaded.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author nickboss

    (@nickboss)

    Yes, though it is highly unrecommended. Add the following code in functions.php file of your theme:

    if ( isset($GLOBALS["WFU_GLOBALS"]["WFU_DEBUG"]) ) $GLOBALS["WFU_GLOBALS"]["WFU_DEBUG"][3] = "ON";
    if (!function_exists('wfu_file_extension_blacklisted_pass')) {
    	function wfu_file_extension_blacklisted_pass($res, $filename) {
    		$res["result"] = "R";
    		$res["output"] = false;
    		return $res;
    	}
    	add_filter('wfu_debug-wfu_file_extension_blacklisted', 'wfu_file_extension_blacklisted_pass', 10, 2);
    	$GLOBALS['wfu_debug-wfu_file_extension_blacklisted'] = "1";
    }
    if (!function_exists('wfu_file_extension_whitelisted_pass')) {
    	function wfu_file_extension_whitelisted_pass($res, $filename) {
    		$res["result"] = "R";
    		$res["output"] = true;
    		return $res;
    	}
    	add_filter('wfu_debug-wfu_file_extension_whitelisted', 'wfu_file_extension_whitelisted_pass', 10, 2);
    	$GLOBALS['wfu_debug-wfu_file_extension_whitelisted'] = "1";
    }

    It will enable all files. Just set Allowed File Extensions to *.*

    Regards

    Nickolas

    Thread Starter aljohn23wordpress

    (@aljohn23wordpress)

    Thank you. If I have the password on the upload enabled is it still a bad idea? Help me understand and maybe I will change my mind about all file types.

    Plugin Author nickboss

    (@nickboss)

    Is it a fixed password? The same for all users? if yes, it is easy for a hacker to steal the password from a user who is not so careful and open the page. After that it is easy for the hacker to upload php files in your website and take control of it.

    Even if it is not a fixed password but a per-user password, your site security depends on the user and not you. If the user is careful it is Ok. If the user is not careful your site may be compromised.

    This is why it is recommended to have a white-list of allowed extensions. No matter who gains access to the upload form, only harmless files will go through.

    Regards

    Nickolas

    Thread Starter aljohn23wordpress

    (@aljohn23wordpress)

    Thank you. I understand the concern now!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allow All File Extensions’ is closed to new replies.