mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
Fix URI structure condition in Probe::detect
- This condition was wrongly discarding all URIs with a schemes
This commit is contained in:
parent
d05d2a348b
commit
67f4038051
1 changed files with 11 additions and 12 deletions
|
@ -686,22 +686,21 @@ class Probe
|
|||
}
|
||||
|
||||
$parts = parse_url($uri);
|
||||
|
||||
if (empty($parts['scheme']) || !empty($parts['host']) && strstr($uri, '@')) {
|
||||
// If the URI starts with "mailto:" then jump directly to the mail detection
|
||||
if (strpos($uri, 'mailto:') !== false) {
|
||||
$uri = str_replace('mailto:', '', $uri);
|
||||
return self::mail($uri, $uid);
|
||||
}
|
||||
|
||||
if ($network == Protocol::MAIL) {
|
||||
return self::mail($uri, $uid);
|
||||
}
|
||||
} else {
|
||||
if (empty($parts['scheme']) && empty($parts['host']) && !strstr($parts['path'], '@')) {
|
||||
Logger::info('URI was not detectable', ['uri' => $uri]);
|
||||
return [];
|
||||
}
|
||||
|
||||
// If the URI starts with "mailto:" then jump directly to the mail detection
|
||||
if (strpos($uri, 'mailto:') !== false) {
|
||||
$uri = str_replace('mailto:', '', $uri);
|
||||
return self::mail($uri, $uid);
|
||||
}
|
||||
|
||||
if ($network == Protocol::MAIL) {
|
||||
return self::mail($uri, $uid);
|
||||
}
|
||||
|
||||
Logger::info('Probing start', ['uri' => $uri]);
|
||||
|
||||
if (!empty($ap_profile['addr']) && ($ap_profile['addr'] != $uri)) {
|
||||
|
|
Loading…
Reference in a new issue