summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php9
1 files changed, 9 insertions, 0 deletions
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));
}