1
1
Fork 0

Remove all-numeric usernames condition

- False negatives aren't recoverable
This commit is contained in:
Hypolite Petovan 2021-12-02 08:03:38 -05:00
parent 1321a52f15
commit f409bd7034

View file

@ -529,12 +529,7 @@ class Probe
$path_parts = explode('/', trim($parts['path'] ?? '', '/'));
if (!empty($path_parts)) {
$nick = ltrim(end($path_parts), '@');
// When the last part of the URI is numeric then it is most likely an ID and not a nick name
if (!is_numeric($nick)) {
$addr = $nick . '@' . $host;
} else {
$nick = '';
}
}
$webfinger = self::getWebfinger($parts['scheme'] . '://' . $host . self::WEBFINGER, 'application/jrd+json', $uri, $addr);