summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLilli <lilli@janrain.com>2010-02-12 12:07:51 -0800
committerLilli <lilli@janrain.com>2010-02-12 12:07:51 -0800
commit8b258060a625290369560f0aca692521c7101b9c (patch)
treeff97e7443f13a54fe3298e3121b6a7d7219a5182
parentc21ba1f386dabdbc4e619e5248aa22f790dbec0d (diff)
downloadphp-openid-8b258060a625290369560f0aca692521c7101b9c.zip
php-openid-8b258060a625290369560f0aca692521c7101b9c.tar.gz
php-openid-8b258060a625290369560f0aca692521c7101b9c.tar.bz2
Added the following patch from the dev@openidenabled.com mailing list:
http://lists.openidenabled.com/pipermail/dev/attachments/20090101/217f2590/attachment.bin Original Message: dev-list-openidenabled at thequod.de dev-list-openidenabled at thequod.de Thu Jan 1 18:14:12 PST 2009 darcs patch: php-openid-urldecode-urlparamkey "This patch also decodes the key of URL params, which is required for param names like 'action[foo]' when the browser sends those urlencoded (Konqueror 4.2 does so). I would like to propose using rawurldecode instead of urldecode, too, but that causes the tests to fail and may be against the OpenID spec (the difference is only that "+" gets decoded with urldecode() but not with rawurldecode IIRC)" This patch was in the form of a Darcs patch, not a normal patch. So solve this, I applied it to the Darcs repository found on openidenabled, then created a new diff file between the original Darcs repo and the new one (with the patch applied) so that I could apply it to this git repo. All hunks were applied successfully.
-rw-r--r--Auth/OpenID.php4
-rw-r--r--Tests/Auth/OpenID/Consumer.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/Auth/OpenID.php b/Auth/OpenID.php
index 924cd1e..3b1680d 100644
--- a/Auth/OpenID.php
+++ b/Auth/OpenID.php
@@ -191,7 +191,7 @@ class Auth_OpenID {
}
list($k, $v) = $parts;
- $data[$k] = urldecode($v);
+ $data[urldecode($k)] = urldecode($v);
}
return $data;
@@ -279,7 +279,7 @@ class Auth_OpenID {
}
list($key, $value) = $pair;
- $new_parts[$key] = urldecode($value);
+ $new_parts[urldecode($key)] = urldecode($value);
}
return $new_parts;
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php
index df1b3a0..73f2a21 100644
--- a/Tests/Auth/OpenID/Consumer.php
+++ b/Tests/Auth/OpenID/Consumer.php
@@ -69,7 +69,7 @@ function Auth_OpenID_parse($qs)
foreach ($parts as $pair) {
list($key, $value) = explode("=", $pair, 2);
assert(!array_key_exists($key, $result));
- $result[$key] = urldecode($value);
+ $result[urldecode($key)] = urldecode($value);
}
return $result;
}