Skip to content

Commit

Permalink
Merge pull request #39 from titanous/master
Browse files Browse the repository at this point in the history
Fix broken extension loop
  • Loading branch information
havard committed May 26, 2011
2 parents 961452e + 5db99ca commit 7411532
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/xrds.js
Expand Up @@ -63,7 +63,7 @@ exports.parse = function(data)
var idMatch = /<(Local|Canonical)ID\s*?>(.*?)<\/\1ID\s*?>/g.exec(service);
if(idMatch)
{
for(var i in svcs)
for(var i = 0; i < svcs.length; i++)
{
var svc = svcs[i];
svc.id = idMatch[2];
Expand All @@ -76,7 +76,7 @@ exports.parse = function(data)
continue;
}

for(var i in svcs)
for(var i = 0; i < svcs.length; i++)
{
var svc = svcs[i];
svc.uri = uriMatch[2];
Expand Down
6 changes: 3 additions & 3 deletions openid.js
Expand Up @@ -764,12 +764,12 @@ function _requestAuthentication(provider, assoc_handle, returnUrl, realm, immedi
params['openid.ns'] = 'http://specs.openid.net/auth/2.0';
}

for(var i in extensions)
for (var i = 0; i < extensions.length; i++)
{
extension = extensions[i]
for(var key in extension.requestParams)
for (var key in extension.requestParams)
{
if (!extension.hasOwnProperty(key)) { continue; }
if (!extension.requestParams.hasOwnProperty(key)) { continue; }
params[key] = extension.requestParams[key];
}
}
Expand Down

0 comments on commit 7411532

Please sign in to comment.