Skip to content

Commit 843320a

Browse files
authored
tracklabels plugin: check favicon mime type (#2776)
1 parent 576a1a2 commit 843320a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

plugins/tracklabels/action.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ function image_name($prefix, $req_field)
8989
@$client->fetchComplex($url);
9090
if ($client->status == 200)
9191
file_put_contents($ico_name, $client->results);
92+
if (strpos(mime_content_type($ico_name), "image/")===false)
93+
@unlink($ico_name);
9294
try_send_image($ico_name, 'image/x-icon');
9395
}
9496
}

0 commit comments

Comments
 (0)