Author: chabotc
Date: Sun Nov 23 01:45:56 2008
New Revision: 719968
URL: http://svn.apache.org/viewvc?rev=719968&view=rev
Log:
SHINDIG-694 by Denis, don't un-magic-quotes raw http data (if your running with
magic quotes on, stop it, we all know it's the wrong thing to do)
Modified:
incubator/shindig/trunk/php/src/social/servlet/JsonRpcServlet.php
Modified: incubator/shindig/trunk/php/src/social/servlet/JsonRpcServlet.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/servlet/JsonRpcServlet.php?rev=719968&r1=719967&r2=719968&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/servlet/JsonRpcServlet.php (original)
+++ incubator/shindig/trunk/php/src/social/servlet/JsonRpcServlet.php Sun Nov
23 01:45:56 2008
@@ -48,10 +48,7 @@
return;
}
if (isset($GLOBALS['HTTP_RAW_POST_DATA']) || isset($_POST['request'])) {
- $requestParam = isset($GLOBALS['HTTP_RAW_POST_DATA']) ?
$GLOBALS['HTTP_RAW_POST_DATA'] : $_POST['request'];
- if (get_magic_quotes_gpc()) {
- $requestParam = stripslashes($requestParam);
- }
+ $requestParam = isset($GLOBALS['HTTP_RAW_POST_DATA']) ?
$GLOBALS['HTTP_RAW_POST_DATA'] : (get_magic_quotes_gpc() ?
stripslashes($_POST['request']) : $_POST['request']);
$request = json_decode($requestParam, true);
if ($request == $requestParam) {
throw new InvalidArgumentException("Malformed json string");