fix invalid separator in magic-public-key XRD and matching parsing.

This commit is contained in:
James Walker 2010-03-11 14:32:22 -05:00
parent 06612e35e4
commit 512e511053
2 changed files with 6 additions and 2 deletions

View File

@ -59,7 +59,11 @@ class MagicEnvelope
}
if ($xrd->links) {
if ($link = Discovery::getService($xrd->links, Magicsig::PUBLICKEYREL)) {
list($type, $keypair) = explode(';', $link['href']);
list($type, $keypair) = explode(',', $link['href']);
if (empty($keypair)) {
// Backwards compatibility check for separator bug in 0.9.0
list($type, $keypair) = explode(';', $link['href']);
}
return $keypair;
}
}

View File

@ -91,7 +91,7 @@ class XrdAction extends Action
}
$xrd->links[] = array('rel' => Magicsig::PUBLICKEYREL,
'href' => 'data:application/magic-public-key;'. $magickey->toString(false));
'href' => 'data:application/magic-public-key,'. $magickey->toString(false));
// TODO - finalize where the redirect should go on the publisher
$url = common_local_url('ostatussub') . '?profile={uri}';