diff options
author | CiaranG <ciaran@ciarang.com> | 2008-09-04 02:55:04 -0400 |
---|---|---|
committer | CiaranG <ciaran@ciarang.com> | 2008-09-04 02:55:04 -0400 |
commit | fff677e6c45f259d4dcc3c4985f71f420060042b (patch) | |
tree | b429c77afba439b4d99390746e8187710c29c6d8 /lib | |
parent | 4d1528734d840e2da0d9b24c18d739cd6d70853e (diff) |
Resolve remote subscribe and omb problems with quotes (Tickets #604 and #567)
darcs-hash:20080904065504-f6e2c-f0c770f52624e7151a93f2ed2b8813657ca88c14.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 9 |
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)); } |