12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- require_once INSTALLDIR . '/lib/apiaction.php';
- class ApiOAuthAction extends ApiAction
- {
-
- function isReadOnly($args)
- {
- return false;
- }
- protected function prepare(array $args=array())
- {
- self::cleanRequest();
- return parent::prepare($args);
- }
-
- static function cleanRequest()
- {
-
- if (get_magic_quotes_gpc() == 1) {
- $_POST = array_map('stripslashes', $_POST);
- $_GET = array_map('stripslashes', $_GET);
- }
-
- unset($_GET['p']);
- unset($_POST['p']);
- unset($_REQUEST['p']);
- $queryArray = explode('&', $_SERVER['QUERY_STRING']);
- for ($i = 0; $i < sizeof($queryArray); $i++) {
- if (substr($queryArray[$i], 0, 2) == 'p=') {
- unset($queryArray[$i]);
- }
- }
- $_SERVER['QUERY_STRING'] = implode('&', $queryArray);
- }
- }
|