]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Merge pull request #12736 from MrPetovan/bug/12733-webfinger-apcontact
[friendica.git] / src / Model / APContact.php
index c72028ef3159b9a430f9f1900e03c12d777340a4..1fedfc0c79c9a607b707b519a0f1bf71aa21e4fd 100644 (file)
@@ -369,6 +369,11 @@ class APContact
                // Unhandled from Kroeg
                // kroeg:blocks, updated
 
+               if (!empty($apcontact['photo']) && !Network::isValidHttpUrl($apcontact['photo'])) {
+                       Logger::info('Invalid URL for photo', ['url' => $apcontact['url'], 'photo' => $apcontact['photo']]);
+                       $apcontact['photo'] = null;
+               }
+
                // When the photo is too large, try to shorten it by removing parts
                if (strlen($apcontact['photo'] ?? '') > 255) {
                        $parts = parse_url($apcontact['photo']);