improve filter_src()

This commit is contained in:
xiaomlove
2025-10-31 19:35:57 +07:00
parent b5bfdc3c99
commit e37f40f20f
4 changed files with 23 additions and 25 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ if ($Attach->enable_attachment())
$ext_l = strrpos($origfilename, ".");
$ext = strtolower(substr($origfilename, $ext_l+1, strlen($origfilename)-($ext_l+1)));
$banned_ext = array('exe', 'com', 'bat', 'msi');
$img_ext = array('jpeg', 'jpg', 'png', 'gif', 'webp', 'bmp', 'tif', 'tiff', 'heic');
$img_ext = \App\Models\Attachment::IMG_EXTENSIONS;
if (!$file || $filesize == 0 || $file["name"] == "") // nothing received
{