]> git.mxchange.org Git - friendica.git/commitdiff
Remove all-numeric usernames condition
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 2 Dec 2021 13:03:38 +0000 (08:03 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 2 Dec 2021 13:03:38 +0000 (08:03 -0500)
- False negatives aren't recoverable

src/Network/Probe.php

index e9e8478524606fdce36abb76d9db420dc3b7b34e..d8c1a91530e23cae1b7dcdf19b1e534763cc86ce 100644 (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 = '';
-                               }
+                               $addr = $nick . '@' . $host;
                        }
 
                        $webfinger = self::getWebfinger($parts['scheme'] . '://' . $host . self::WEBFINGER, 'application/jrd+json', $uri, $addr);