* Add ability to plugins to check uploaded media files for invalid
file extensions. Added more escaping to user- and groupnames for untrusted author environments, thanks to Hanno Boeck. (garvinhicking)
This commit is contained in:
@ -24,7 +24,14 @@ function serendipity_isActiveFile($file) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return preg_match('@\.(php[345]?|[psj]html?|aspx?|cgi|jsp|py|pl)$@i', $file);
|
||||
$core = preg_match('@\.(php[345]?|[psj]html?|aspx?|cgi|jsp|py|pl)$@i', $file);
|
||||
if ($core) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$eventData = false;
|
||||
serendipity_plugin_api::hook_event('backend_media_check', $eventData, $file);
|
||||
return $eventData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user