$result = false;
+ logger("Probing ".$uri, LOGGER_DEBUG);
+
if (in_array($network, array("", NETWORK_DFRN)))
$result = self::dfrn($webfinger);
if ((!$result AND ($network == "")) OR ($network == NETWORK_DIASPORA))
$result["addr"] = $addr;
}
+ logger($uri." is ".$result["network"], LOGGER_DEBUG);
+
if (!isset($result["baseurl"]) OR ($result["baseurl"] == "")) {
$pos = strpos($result["url"], $host);
if ($pos)
elseif (($link["rel"] == "diaspora-public-key") AND ($link["href"] != "")) {
$data["pubkey"] = base64_decode($link["href"]);
- if (strstr($data["pubkey"], 'RSA ') OR ($link["type"] == "RSA"))
+ //if (strstr($data["pubkey"], 'RSA ') OR ($link["type"] == "RSA"))
+ if (strstr($data["pubkey"], 'RSA '))
$data["pubkey"] = rsatopem($data["pubkey"]);
}
}
elseif (($link["rel"] == "diaspora-public-key") AND ($link["href"] != "")) {
$data["pubkey"] = base64_decode($link["href"]);
- if (strstr($data["pubkey"], 'RSA ') OR ($link["type"] == "RSA"))
+ //if (strstr($data["pubkey"], 'RSA ') OR ($link["type"] == "RSA"))
+ if (strstr($data["pubkey"], 'RSA '))
$data["pubkey"] = rsatopem($data["pubkey"]);
}
}
if (!isset($data["url"]) OR ($hcard == ""))
return false;
- if (isset($webfinger["aliases"]))
+ if (is_array($webfinger["aliases"]))
foreach ($webfinger["aliases"] AS $alias)
if (normalise_link($alias) != normalise_link($data["url"]) AND !strstr($alias, "@"))
$data["alias"] = $alias;