Skip to content

Commit

Permalink
#2 - this is not the correct place to stripslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Jun 18, 2014
1 parent 70f7ee2 commit 1798f15
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions plugins/restapi.php
Expand Up @@ -26,23 +26,6 @@ class restapi extends phplistPlugin {
function restapi() {
parent::phplistplugin();
$this->coderoot = dirname(__FILE__) . '/restapi/';
// Need to find a better time to strip slashes. This is already done for the web interface in storemessage.php
// recursively strip slashes from an array
function stripslashes_r($array) {
foreach ($array as $key => $value) {
$array[$key] = is_array($value) ?
stripslashes_r($value) :
stripslashes($value);
}
return $array;
}

if (get_magic_quotes_gpc()) {
$_GET = stripslashes_r($_GET);
$_POST = stripslashes_r($_POST);
$_COOKIE = stripslashes_r($_COOKIE);
$_REQUEST = stripslashes_r($_REQUEST);
}
}

function adminmenu() {
Expand Down

0 comments on commit 1798f15

Please sign in to comment.