Browse Source

Fix OpenID 1.0 delegation

Closes #15
tags/0.6
Chris Smith 14 years ago
parent
commit
ceef6e5b04
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      processor.php
  2. 1
    1
      urlbuilder.inc.php

+ 1
- 1
processor.php View File

@@ -279,7 +279,7 @@
279 279
  function processPositiveResponse($valid) {
280 280
   Logger::log('Positive response: identity = %s, expected = %s', $_REQUEST['openid_identity'], $_SESSION['openid']['claimedId']);
281 281
 
282
-  if ($_REQUEST['openid_identity'] != $_SESSION['openid']['claimedId']) {
282
+  if ($_REQUEST['openid_identity'] != $_SESSION['openid']['claimedId'] && $_REQUEST['openid_identity'] != $_SESSION['openid']['opLocalId']) {
283 283
    if ($_SESSION['openid']['claimedId'] == 'http://specs.openid.net/auth/2.0/identifier_select') {
284 284
     $disc = new Discoverer($_REQUEST['openid_claimed_id'], false);
285 285
 

+ 1
- 1
urlbuilder.inc.php View File

@@ -61,7 +61,7 @@
61 61
   public static function buildRequest($type, $base, $delegate, $identity, $returnURL, $handle, $version = 1) {
62 62
    $args = array(
63 63
     'openid.mode' => 'checkid_' . $type,
64
-    'openid.identity' => $identity,
64
+    'openid.identity' => $version == 1 ? $delegate : $identity,
65 65
     'openid.claimed_id' => $delegate,
66 66
     ($version == 1 ? 'openid.trust_root' : 'openid.realm') => self::getTrustRoot($returnURL),
67 67
     'openid.return_to' => self::addArguments($returnURL,

Loading…
Cancel
Save