X-Git-Url: https://jfr.im/git/uguu.git/blobdiff_plain/af51aa063006abf109648545465ae772c4a7eb66..7bc98e88525b25f26b53a77921159a36343d1d65:/includes/core.php diff --git a/includes/core.php b/includes/core.php index 29cfdb0..5aca11b 100644 --- a/includes/core.php +++ b/includes/core.php @@ -1,19 +1,18 @@ + +//Verify that the extension is allowed +function verify_extension($ext, $type){ + if(CONFIG_EXTENSION_BLOCKING_MODE === "WHITELIST") { + $allowed = in_array($ext, unserialize(CONFIG_ALLOWED_EXTENSIONS)); + }else{ + $allowed = !in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS)); + } + + if(!$allowed){ + if($type==='normal'){ + include_once(CONFIG_ROOT_PATH.'error_meow.php'); + exit(0); + }else{ + exit('File type not allowed.'); + } + } +}