diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-03-23 10:02:01 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-03-23 10:02:01 +0100 |
commit | a2b7fdb8e14f02aff9ab4b1b5646f640123ec0c7 (patch) | |
tree | 676ba2c0959bb1d99c34074a9ac4043862d91871 /lib/plugins/acl | |
parent | 7518cd81d69733d64ee5c80a8e5df4fcaa33246d (diff) | |
parent | b967e5fc8fd93226eba7926c13b73b93878f182b (diff) | |
download | rpg-a2b7fdb8e14f02aff9ab4b1b5646f640123ec0c7.tar.gz rpg-a2b7fdb8e14f02aff9ab4b1b5646f640123ec0c7.tar.bz2 |
Merge branch 'master' of https://github.com/dom-mel/dokuwiki into pull-request-87
* 'master' of https://github.com/dom-mel/dokuwiki: (38 commits)
removed requires, changed conf check in xmlrpc.php
removed require_once for autoloaded fulltext.php
updated comment
added dokuwiki.getXMLRPCAPIVersion and wiki.getRPCVersionSupported
added RPC_CALL_ADD event.
replaced $HTTP_RAW_POST_DATA with http_get_raw_post_data function
changed error code for unauthorized method calls.
typo fixes
moved plugin and core method calls to seperate function
corrected comment
added getapi methods to remote plugin
removed unused class
fixed testcase
refactored RemoteAccessDenied to RemoteAccessDeniedException
adjusted test cases
delegate file and date transformation to remote library
treat null as empty array
added missing getTime
added missing getVersion
set login as public method
...
Diffstat (limited to 'lib/plugins/acl')
-rw-r--r-- | lib/plugins/acl/ajax.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/plugins/acl/ajax.php b/lib/plugins/acl/ajax.php index 71a2eb03a..3a5d89c08 100644 --- a/lib/plugins/acl/ajax.php +++ b/lib/plugins/acl/ajax.php @@ -6,16 +6,17 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -//fix for Opera XMLHttpRequests -if(!count($_POST) && !empty($HTTP_RAW_POST_DATA)){ - parse_str($HTTP_RAW_POST_DATA, $_POST); -} - if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../'); require_once(DOKU_INC.'inc/init.php'); //close session session_write_close(); +//fix for Opera XMLHttpRequests +$postData = http_get_raw_post_data(); +if(!count($_POST) && !empty($postData)){ + parse_str($postData, $_POST); +} + if(!auth_isadmin()) die('for admins only'); if(!checkSecurityToken()) die('CRSF Attack'); |