core update from 7.37 to 7.38
This commit is contained in:
@@ -5,8 +5,8 @@ package = Core
|
||||
core = 7.x
|
||||
files[] = openid.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2015-05-07
|
||||
version = "7.37"
|
||||
; Information added by Drupal.org packaging script on 2015-08-19
|
||||
version = "7.39"
|
||||
project = "drupal"
|
||||
datestamp = "1430973154"
|
||||
datestamp = "1440020197"
|
||||
|
||||
|
@@ -365,14 +365,20 @@ function openid_complete($response = array()) {
|
||||
// to the OpenID Provider, we need to do discovery on the returned
|
||||
// identififer to make sure that the provider is authorized to
|
||||
// respond on behalf of this.
|
||||
if ($response_claimed_id != $claimed_id) {
|
||||
if ($response_claimed_id != $claimed_id || $response_claimed_id != $response['openid.identity']) {
|
||||
$discovery = openid_discovery($response['openid.claimed_id']);
|
||||
$uris = array();
|
||||
if ($discovery && !empty($discovery['services'])) {
|
||||
$uris = array();
|
||||
foreach ($discovery['services'] as $discovered_service) {
|
||||
if (in_array('http://specs.openid.net/auth/2.0/server', $discovered_service['types']) || in_array('http://specs.openid.net/auth/2.0/signon', $discovered_service['types'])) {
|
||||
$uris[] = $discovered_service['uri'];
|
||||
if (!in_array('http://specs.openid.net/auth/2.0/server', $discovered_service['types']) && !in_array('http://specs.openid.net/auth/2.0/signon', $discovered_service['types'])) {
|
||||
continue;
|
||||
}
|
||||
// The OP-Local Identifier (if different than the Claimed
|
||||
// Identifier) must be present in the XRDS document.
|
||||
if ($response_claimed_id != $response['openid.identity'] && (!isset($discovered_service['identity']) || $discovered_service['identity'] != $response['openid.identity'])) {
|
||||
continue;
|
||||
}
|
||||
$uris[] = $discovered_service['uri'];
|
||||
}
|
||||
}
|
||||
if (!in_array($service['uri'], $uris)) {
|
||||
|
@@ -94,7 +94,7 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
|
||||
$identity = url('openid-test/yadis/xrds/dummy-user', array('absolute' => TRUE, 'fragment' => $this->randomName()));
|
||||
// Tell openid_test.module to respond with this identifier. If the fragment
|
||||
// part is present in the identifier, it should be retained.
|
||||
variable_set('openid_test_response', array('openid.claimed_id' => $identity));
|
||||
variable_set('openid_test_response', array('openid.claimed_id' => $identity, 'openid.identity' => openid_normalize($identity)));
|
||||
$this->addIdentity(url('openid-test/yadis/xrds/server', array('absolute' => TRUE)), 2, 'http://specs.openid.net/auth/2.0/identifier_select', $identity);
|
||||
variable_set('openid_test_response', array());
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = openid
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2015-05-07
|
||||
version = "7.37"
|
||||
; Information added by Drupal.org packaging script on 2015-08-19
|
||||
version = "7.39"
|
||||
project = "drupal"
|
||||
datestamp = "1430973154"
|
||||
datestamp = "1440020197"
|
||||
|
||||
|
@@ -150,6 +150,7 @@ function openid_test_yadis_xrds() {
|
||||
<Service priority="20">
|
||||
<Type>http://specs.openid.net/auth/2.0/server</Type>
|
||||
<URI>' . url('openid-test/endpoint', array('absolute' => TRUE)) . '</URI>
|
||||
<LocalID>' . url('openid-test/yadis/xrds/server', array('absolute' => TRUE)) . '</LocalID>
|
||||
</Service>';
|
||||
}
|
||||
elseif (arg(3) == 'delegate') {
|
||||
|
Reference in New Issue
Block a user