From 0af2be14eec590ca55bec12b6e37beed588d0436 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 7 Dec 2022 22:15:47 -0500 Subject: [PATCH] Check for parts key existence before performing strpos in Network\Probe - Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783 --- src/Network/Probe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Probe.php b/src/Network/Probe.php index e74b437345..87c28619dc 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -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 []; } -- 2.39.5