summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Auth/OpenID/Consumer.php5
-rw-r--r--Tests/Auth/OpenID/Consumer.php6
2 files changed, 8 insertions, 3 deletions
diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php
index 330a5ba..9010ddc 100644
--- a/Auth/OpenID/Consumer.php
+++ b/Auth/OpenID/Consumer.php
@@ -169,6 +169,7 @@ require_once "Auth/OpenID/DiffieHellman.php";
require_once "Auth/OpenID/KVForm.php";
require_once "Auth/OpenID/Nonce.php";
require_once "Auth/OpenID/Discover.php";
+require_once "Auth/OpenID/URINorm.php";
require_once "Auth/Yadis/Manager.php";
require_once "Auth/Yadis/XRI.php";
@@ -814,8 +815,8 @@ class Auth_OpenID_GenericConsumer {
$msg_return_to = $message->getArg(Auth_OpenID_OPENID_NS,
'return_to');
- $return_to_parts = parse_url($return_to);
- $msg_return_to_parts = parse_url($msg_return_to);
+ $return_to_parts = parse_url(Auth_OpenID_urinorm($return_to));
+ $msg_return_to_parts = parse_url(Auth_OpenID_urinorm($msg_return_to));
// If port is absent from both, add it so it's equal in the
// check below.
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php
index c289027..613bf01 100644
--- a/Tests/Auth/OpenID/Consumer.php
+++ b/Tests/Auth/OpenID/Consumer.php
@@ -1331,7 +1331,11 @@ class TestReturnToArgs extends PHPUnit_TestCase {
array($return_to . "?another=arg#fragment",
array(array(
array(Auth_OpenID_BARE_NS, 'another'),
- 'arg')))
+ 'arg'))),
+ array("HTTP://some.url/path",array()),
+ array("http://some.URL/path",array()),
+ array("http://some.url:80/path",array()),
+ array("http://some.url/./path",array())
);
$endpoint = null;