Fix URI structure condition in Probe::detect
- This condition was wrongly discarding all URIs with a schemes
This commit is contained in:
@@ -686,8 +686,11 @@ class Probe
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parts = parse_url($uri);
|
$parts = parse_url($uri);
|
||||||
|
if (empty($parts['scheme']) && empty($parts['host']) && !strstr($parts['path'], '@')) {
|
||||||
|
Logger::info('URI was not detectable', ['uri' => $uri]);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($parts['scheme']) || !empty($parts['host']) && strstr($uri, '@')) {
|
|
||||||
// If the URI starts with "mailto:" then jump directly to the mail detection
|
// If the URI starts with "mailto:" then jump directly to the mail detection
|
||||||
if (strpos($uri, 'mailto:') !== false) {
|
if (strpos($uri, 'mailto:') !== false) {
|
||||||
$uri = str_replace('mailto:', '', $uri);
|
$uri = str_replace('mailto:', '', $uri);
|
||||||
@@ -697,10 +700,6 @@ class Probe
|
|||||||
if ($network == Protocol::MAIL) {
|
if ($network == Protocol::MAIL) {
|
||||||
return self::mail($uri, $uid);
|
return self::mail($uri, $uid);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Logger::info('URI was not detectable', ['uri' => $uri]);
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger::info('Probing start', ['uri' => $uri]);
|
Logger::info('Probing start', ['uri' => $uri]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user