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;
}
}