Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

is_banned_extension()

Description

Is the given extension in the list of blocked extensions?
Also ensures extension is no longer than 10 characters due to resource.file_extension limit

Parameters

ColumnTypeDefaultDescription
$extension string - file extension to check

Return

bool

Location

include/file_functions.php lines 251 to 260

Definition

 
function is_banned_extension($extension)
    {
    global 
$banned_extensions;    

    return 
in_array(strtolower($extension), array_map('strtolower'$banned_extensions)) ||
        
strlen($extension) > 10 ||
        
$extension == "." ||
        
$extension == "" ||
        
$extension == '"';
    }

This article was last updated 27th April 2024 07:05 Europe/London time based on the source file dated 25th April 2024 17:25 Europe/London time.