From 1464b111f3cd27f7aac238ca8d74e980e20ee0b8 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 22 Mar 2017 07:10:04 +0100 Subject: [PATCH] plugins: clearly annotate the reason why this is bad in general --- src/etc/inc/plugins.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/plugins.inc b/src/etc/inc/plugins.inc index 8a86b4888..e8c96fd71 100644 --- a/src/etc/inc/plugins.inc +++ b/src/etc/inc/plugins.inc @@ -48,8 +48,16 @@ function plugins_scan() foreach ($plugins as $plugin) { $name = preg_replace('/' . preg_quote($path, '/') . '/', '', $plugin); $name = preg_replace('/' . preg_quote($ext, '/') . '/', '', $name); - /* if the old file still exists upgrade went wrong */ if (file_exists($clash . $name . $ext)) { + /* + * Congratulations, you found the reason why your plugin doesn't + * work! It seems that you're using a name that is already taken + * by the base system. Please change the name of your plugin. + * + * A traceable call stack requires unique prefixes, which is what + * will prevent this from working. Do not remove this check + * without discussing the consequences with the authors. + */ continue; } $ret[$name] = $plugin;