]> git.mxchange.org Git - friendica.git/commitdiff
Check for parts key existence before performing strpos in Network\Probe
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 8 Dec 2022 03:15:47 +0000 (22:15 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 16:38:02 +0000 (11:38 -0500)
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783

src/Network/Probe.php

index e74b4373454b4403ef0d275a6c047ce9b6de169f..87c28619dc7b8f6c1b0f7661084284a0ae50a6ca 100644 (file)
@@ -684,7 +684,7 @@ class Probe
                }
 
                $parts = parse_url($uri);
-               if (empty($parts['scheme']) && empty($parts['host']) && !strstr($parts['path'], '@')) {
+               if (empty($parts['scheme']) && empty($parts['host']) && (empty($parts['path']) || strpos($parts['path'], '@') === false)) {
                        Logger::info('URI was not detectable', ['uri' => $uri]);
                        return [];
                }