Not a bug XenForo_Upload ignore allowedExtensions

truonglv

Well-known member
As the title. You have provide an method which allow us set custom the allowedExtensions. But in some case you are not using it and use your defined.

XenForo_Upload the line 200:
PHP:
if (in_array($this->_extension, array('gif', 'jpg', 'jpe', 'jpeg', 'png')))

I think need an case check if provide an custom extensions of image then using it.
 
Allowed extensions are simply all extensions. Images will always have additional other checks. The example you gave is specifically where a known image extension is given but the file didn't appear to contain an image, so I'm not sure what case would require mentioning "txt" there (since that's not a known/special case image).
 
Allowed extensions are simply all extensions. Images will always have additional other checks. The example you gave is specifically where a known image extension is given but the file didn't appear to contain an image, so I'm not sure what case would require mentioning "txt" there (since that's not a known/special case image).
Oh yes. I have look around and you have check it again in another method. :oops::oops:
 
Back
Top Bottom