From fff677e6c45f259d4dcc3c4985f71f420060042b Mon Sep 17 00:00:00 2001 From: CiaranG Date: Thu, 4 Sep 2008 02:55:04 -0400 Subject: Resolve remote subscribe and omb problems with quotes (Tickets #604 and #567) darcs-hash:20080904065504-f6e2c-f0c770f52624e7151a93f2ed2b8813657ca88c14.gz --- lib/util.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index 153009212..df64e74be 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1424,6 +1424,15 @@ function common_copy_args($from) { return $to; } +// Neutralise the evil effects of magic_quotes_gpc in the current request. +// This is used before handing a request off to OAuthRequest::from_request. +function common_remove_magic_from_request() { + if(get_magic_quotes_gpc()) { + $_POST=array_map('stripslashes',$_POST); + $_GET=array_map('stripslashes',$_GET); + } +} + function common_user_uri(&$user) { return common_local_url('userbyid', array('id' => $user->id)); } -- cgit v1.2.3-54-g00ecf