]> git.mjollnir.org Git - s9y.git/commitdiff
Ensure not using 'online_repository' as pluginPath
authorgarvinhicking <garvinhicking>
Tue, 5 Jun 2007 11:44:34 +0000 (11:44 +0000)
committergarvinhicking <garvinhicking>
Tue, 5 Jun 2007 11:44:34 +0000 (11:44 +0000)
include/plugin_api.inc.php

index 3ba4a56d2dfe94a7f4e5e712073e80cbb07f6ff3..9dd2d646eaea00c54e0263f03272a0300f27ad21 100644 (file)
@@ -111,6 +111,10 @@ class serendipity_plugin_api {
         // Secure Plugin path. No leading slashes, no backslashes, no "up" directories
         $pluginPath = preg_replace('@^(/)@', '', $pluginPath);
         $pluginPath = str_replace(array('..', "\\"), array('', '/'), serendipity_db_escape_string($pluginPath));
+        
+        if ($pluginPath == 'online_repository') {
+            $pluginPath = $key;
+        }
 
         $rs = serendipity_db_query("SELECT MAX(sort_order) as sort_order_max FROM {$serendipity['dbPrefix']}plugins WHERE placement = '$default_placement'", true, 'num');