MDL-55742 mod_lti: Remove support for get_magic_quotes_gpc
authorJohn Okely <john@moodle.com>
Wed, 31 Aug 2016 08:57:38 +0000 (16:57 +0800)
committerJohn Okely <john@moodle.com>
Thu, 1 Sep 2016 06:58:29 +0000 (14:58 +0800)
Thanks to Bishop Bettini for the original patch.

mod/lti/OAuth.php

index bdd6b2f..0ba4e85 100644 (file)
@@ -275,15 +275,6 @@ class OAuthRequest {
             $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
 
             $ourpost = $_POST;
-            // Deal with magic_quotes
-            // http://www.php.net/manual/en/security.magicquotes.disabling.php
-            if (get_magic_quotes_gpc()) {
-                $outpost = array();
-                foreach ($_POST as $k => $v) {
-                    $v = stripslashes($v);
-                    $ourpost[$k] = $v;
-                }
-            }
             // Add POST Parameters if they exist
             $parameters = array_merge($parameters, $ourpost);