summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-16 09:31:16 +0300
committerAndrew Dolgov <[email protected]>2019-08-16 09:31:16 +0300
commitd94348421d8d791eec29afd2e01fb1c9ba181de1 (patch)
treed58719424fe0ec863ae7b76c566167247b745cb8
parent9c366a4811dd0b919171f3de04c4cd781c5e8e20 (diff)
use clean_filename() instead of basename()/clean() combinations in a bunch of places
-rw-r--r--classes/backend.php2
-rwxr-xr-xclasses/pluginhost.php2
-rwxr-xr-xclasses/rpc.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/classes/backend.php b/classes/backend.php
index 5bd724728..122e28c65 100644
--- a/classes/backend.php
+++ b/classes/backend.php
@@ -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();
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 9330e9e5e..eab808ae9 100755
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -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;
diff --git a/classes/rpc.php b/classes/rpc.php
index 8736cbb65..84c9cfe92 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -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']);