summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/action.php6
-rw-r--r--lib/openid.php2
-rw-r--r--lib/util.php9
3 files changed, 11 insertions, 6 deletions
diff --git a/lib/action.php b/lib/action.php
index a4cae7066..06d3901d1 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -40,11 +40,7 @@ class Action { // lawsuit
}
function handle($argarray) {
- $strip = get_magic_quotes_gpc();
- $this->args = array();
- foreach ($argarray as $k => $v) {
- $this->args[$k] = ($strip) ? stripslashes($v) : $v;
- }
+ $this->args =& common_copy_args($argarray);
}
function boolean($key, $def=false) {
diff --git a/lib/openid.php b/lib/openid.php
index d044aa762..9adf8e9f7 100644
--- a/lib/openid.php
+++ b/lib/openid.php
@@ -95,7 +95,7 @@ function oid_get_user($openid_url) {
function oid_check_immediate($openid_url, $backto=NULL) {
if (!$backto) {
$action = $_REQUEST['action'];
- $args = clone($_GET);
+ $args = common_copy_args($_GET);
unset($args['action']);
$backto = common_local_url($action, $args);
}
diff --git a/lib/util.php b/lib/util.php
index eb019ac7e..a4c30cbe4 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -887,3 +887,12 @@ function common_config($main, $sub) {
global $config;
return $config[$main][$sub];
}
+
+function common_copy_args($from) {
+ $to = array();
+ $strip = get_magic_quotes_gpc();
+ foreach ($from as $k => $v) {
+ $to[$k] = ($strip) ? stripslashes($v) : $v;
+ }
+ return $to;
+} \ No newline at end of file