mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Check link after fetching page as well
This commit is contained in:
parent
085b50be8b
commit
ff16fd7d9c
1 changed files with 6 additions and 0 deletions
|
|
@ -412,6 +412,12 @@ App::get('/v1/avatars/favicon')
|
|||
$outputExt = 'ico';
|
||||
}
|
||||
|
||||
$domain = new Domain(\parse_url($outputHref, PHP_URL_HOST));
|
||||
|
||||
if (!$domain->isKnown()) {
|
||||
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
|
||||
}
|
||||
|
||||
if ('ico' == $outputExt) { // Skip crop, Imagick isn\'t supporting icon files
|
||||
$data = @\file_get_contents($outputHref, false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue