Issue 6168: "redir" now mostly use OWA
This commit is contained in:
parent
89f5a9c550
commit
491fc5f78a
6 changed files with 34 additions and 10 deletions
|
|
@ -98,6 +98,26 @@ class Contact extends BaseObject
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Get the basepath for a given contact link
|
||||
*
|
||||
* @param string $url The contact link
|
||||
*
|
||||
* @return string basepath
|
||||
*/
|
||||
public static function getBasepath($url)
|
||||
{
|
||||
$data = Probe::uri($url);
|
||||
if (!empty($data['baseurl'])) {
|
||||
return $data['baseurl'];
|
||||
}
|
||||
|
||||
$urlarr = explode('/profile/', $url);
|
||||
$basepath = $urlarr[0];
|
||||
|
||||
return $basepath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the contact id for the user and the public contact id for a given contact id
|
||||
*
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class CurlResult
|
|||
|
||||
$this->redirectUrl = Network::unparseURL($redirect_parts);
|
||||
|
||||
$this->isRedirectUrl = filter_var($this->redirectUrl, FILTER_VALIDATE_URL) !== false;
|
||||
$this->isRedirectUrl = true;
|
||||
} else {
|
||||
$this->isRedirectUrl = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class Probe
|
|||
}
|
||||
}
|
||||
|
||||
self::$baseurl = "http://".$host;
|
||||
self::$baseurl = $host_url;
|
||||
|
||||
Logger::log("Probing successful for ".$host, Logger::DEBUG);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class LDSignature
|
|||
}
|
||||
|
||||
$actor = JsonLD::fetchElement($data, 'actor', 'id');
|
||||
if (empty($actor)) {
|
||||
if (empty($actor) || !is_string($actor)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue