Есть ли в данном коде для загрузки картинки уязвимость?
$album_dir = "/home/......";
$allowed_files = array('jpg', 'jpeg', 'jpe', 'png');
$image_tmp = $_FILES['uploadfile']['tmp_name'];
$image_name = $_FILES['uploadfile']['name'];
list($width, $height) = getimagesize($image_tmp);
$file_widthq = $width;
$file_heightq = $height;
$size = getimagesize($image_tmp);
$server_time = date("is");
if($size) {
$image_rename = substr(md5($server_time+rand(1,100000)), 0, 20);
$image_size = $_FILES['uploadfile']['size'];
$type = explode(".", $image_name);
$type = end($type);
if(in_array(strtolower($type), $allowed_files)){
if($image_size < 5000000){
$res_type = strtolower('.'.$type);
}
}
}
Спасибо.