Skip to content

Commit 8b25806

Browse files
author
Lilli
committed
Added the following patch from the [email protected] 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.
1 parent c21ba1f commit 8b25806

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Auth/OpenID.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function params_from_string($str)
191191
}
192192

193193
list($k, $v) = $parts;
194-
$data[$k] = urldecode($v);
194+
$data[urldecode($k)] = urldecode($v);
195195
}
196196

197197
return $data;
@@ -279,7 +279,7 @@ function parse_str($query)
279279
}
280280

281281
list($key, $value) = $pair;
282-
$new_parts[$key] = urldecode($value);
282+
$new_parts[urldecode($key)] = urldecode($value);
283283
}
284284

285285
return $new_parts;

Tests/Auth/OpenID/Consumer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function Auth_OpenID_parse($qs)
6969
foreach ($parts as $pair) {
7070
list($key, $value) = explode("=", $pair, 2);
7171
assert(!array_key_exists($key, $result));
72-
$result[$key] = urldecode($value);
72+
$result[urldecode($key)] = urldecode($value);
7373
}
7474
return $result;
7575
}

0 commit comments

Comments
 (0)