summaryrefslogtreecommitdiff
path: root/lib/plugins
diff options
context:
space:
mode:
authorjgpcx <jerry@gpcx.de>2014-01-28 17:02:25 +0100
committerjgpcx <jerry@gpcx.de>2014-01-28 17:02:25 +0100
commitb15cd32d2f75fbf943eda38a7b90f05d2806dae5 (patch)
tree1fe038b5755289cc2b1b4f3d85686961d64ddb23 /lib/plugins
parent48ccdc135140fd87d4dde1552692c507f3b5301f (diff)
downloadrpg-b15cd32d2f75fbf943eda38a7b90f05d2806dae5.tar.gz
rpg-b15cd32d2f75fbf943eda38a7b90f05d2806dae5.tar.bz2
Update action.php
fix bug that only allows admins any AJAX calls
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/extension/action.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php
index 9dd1648ff..3f2ccaace 100644
--- a/lib/plugins/extension/action.php
+++ b/lib/plugins/extension/action.php
@@ -32,16 +32,17 @@ class action_plugin_extension extends DokuWiki_Action_Plugin {
global $USERINFO;
global $INPUT;
+
+ if($event->data != 'plugin_extension') return;
+ $event->preventDefault();
+ $event->stopPropagation();
+
if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])){
http_status(403);
echo 'Forbidden';
exit;
}
- if($event->data != 'plugin_extension') return;
- $event->preventDefault();
- $event->stopPropagation();
-
header('Content-Type: text/html; charset=utf-8');
$ext = $INPUT->str('ext');