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

master
Andrew Dolgov 5 years ago
parent 9c366a4811
commit d94348421d

@ -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();

@ -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;

@ -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']);

Loading…
Cancel
Save