Warnings removed
This commit is contained in:
parent
f5593b1981
commit
e1c0b4fe03
1 changed files with 9 additions and 3 deletions
|
@ -203,6 +203,8 @@ class Probe {
|
||||||
|
|
||||||
$result = false;
|
$result = false;
|
||||||
|
|
||||||
|
logger("Probing ".$uri, LOGGER_DEBUG);
|
||||||
|
|
||||||
if (in_array($network, array("", NETWORK_DFRN)))
|
if (in_array($network, array("", NETWORK_DFRN)))
|
||||||
$result = self::dfrn($webfinger);
|
$result = self::dfrn($webfinger);
|
||||||
if ((!$result AND ($network == "")) OR ($network == NETWORK_DIASPORA))
|
if ((!$result AND ($network == "")) OR ($network == NETWORK_DIASPORA))
|
||||||
|
@ -223,6 +225,8 @@ class Probe {
|
||||||
$result["addr"] = $addr;
|
$result["addr"] = $addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger($uri." is ".$result["network"], LOGGER_DEBUG);
|
||||||
|
|
||||||
if (!isset($result["baseurl"]) OR ($result["baseurl"] == "")) {
|
if (!isset($result["baseurl"]) OR ($result["baseurl"] == "")) {
|
||||||
$pos = strpos($result["url"], $host);
|
$pos = strpos($result["url"], $host);
|
||||||
if ($pos)
|
if ($pos)
|
||||||
|
@ -358,7 +362,8 @@ class Probe {
|
||||||
elseif (($link["rel"] == "diaspora-public-key") AND ($link["href"] != "")) {
|
elseif (($link["rel"] == "diaspora-public-key") AND ($link["href"] != "")) {
|
||||||
$data["pubkey"] = base64_decode($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"]);
|
$data["pubkey"] = rsatopem($data["pubkey"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,7 +492,8 @@ class Probe {
|
||||||
elseif (($link["rel"] == "diaspora-public-key") AND ($link["href"] != "")) {
|
elseif (($link["rel"] == "diaspora-public-key") AND ($link["href"] != "")) {
|
||||||
$data["pubkey"] = base64_decode($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"]);
|
$data["pubkey"] = rsatopem($data["pubkey"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,7 +501,7 @@ class Probe {
|
||||||
if (!isset($data["url"]) OR ($hcard == ""))
|
if (!isset($data["url"]) OR ($hcard == ""))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (isset($webfinger["aliases"]))
|
if (is_array($webfinger["aliases"]))
|
||||||
foreach ($webfinger["aliases"] AS $alias)
|
foreach ($webfinger["aliases"] AS $alias)
|
||||||
if (normalise_link($alias) != normalise_link($data["url"]) AND !strstr($alias, "@"))
|
if (normalise_link($alias) != normalise_link($data["url"]) AND !strstr($alias, "@"))
|
||||||
$data["alias"] = $alias;
|
$data["alias"] = $alias;
|
||||||
|
|
Loading…
Reference in a new issue