mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +00:00
Avoid local network communication / invalid url requests
This commit is contained in:
parent
6bedd190b9
commit
ba4860b787
12 changed files with 96 additions and 105 deletions
|
@ -180,7 +180,7 @@ class Media
|
|||
}
|
||||
|
||||
// Fetch the mimetype or size if missing.
|
||||
if (empty($media['mimetype']) || empty($media['size'])) {
|
||||
if (Network::isValidHttpUrl($media['url']) && (empty($media['mimetype']) || empty($media['size']))) {
|
||||
$timeout = DI::config()->get('system', 'xrd_timeout');
|
||||
$curlResult = DI::httpClient()->head($media['url'], [HttpClientOptions::TIMEOUT => $timeout]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue