mirror of
https://github.com/friendica/friendica
synced 2025-04-28 13:04:23 +02:00
Avoid more local links and bad http requests
This commit is contained in:
parent
fc46778a00
commit
999cdc7db9
11 changed files with 62 additions and 81 deletions
|
@ -368,10 +368,13 @@ class APContact
|
|||
|
||||
// Unhandled from Kroeg
|
||||
// kroeg:blocks, updated
|
||||
if (!empty($apcontact['photo'])) {
|
||||
$apcontact['photo'] = trim($apcontact['photo']);
|
||||
}
|
||||
|
||||
if (!empty($apcontact['photo']) && !Network::isValidHttpUrl($apcontact['photo'])) {
|
||||
Logger::info('Invalid URL for photo', ['url' => $apcontact['url'], 'photo' => $apcontact['photo']]);
|
||||
$apcontact['photo'] = null;
|
||||
Logger::warning('Invalid URL for photo', ['url' => $apcontact['url'], 'photo' => $apcontact['photo']]);
|
||||
$apcontact['photo'] = '';
|
||||
}
|
||||
|
||||
// When the photo is too large, try to shorten it by removing parts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue