use clean_filename() instead of basename()/clean() combinations in a bunch of places

This commit is contained in:
Andrew Dolgov 2019-08-16 09:31:16 +03:00
parent 9c366a4811
commit d94348421d
3 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ class Backend extends Handler {
}
function help() {
$topic = basename(clean($_REQUEST["topic"])); // only one for now
$topic = clean_filename($_REQUEST["topic"]); // only one for now
if ($topic == "main") {
$info = get_hotkeys_info();

View File

@ -186,7 +186,7 @@ class PluginHost {
foreach ($plugins as $class) {
$class = trim($class);
$class_file = strtolower(basename($class));
$class_file = strtolower(clean_filename($class));
if (!is_dir(__DIR__."/../plugins/$class_file") &&
!is_dir(__DIR__."/../plugins.local/$class_file")) continue;

View File

@ -572,7 +572,7 @@ class RPC extends Handler_Protected {
function log() {
$msg = clean($_REQUEST['msg']);
$file = basename(clean($_REQUEST['file']));
$file = clean_filename($_REQUEST['file']);
$line = (int) clean($_REQUEST['line']);
$context = clean($_REQUEST['context']);