• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug XenForo_Upload ignore allowedExtensions

truonglv

Formerly Nobita.Kun
#1
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.
 

Mike

XenForo developer
Staff member
#2
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).
 

truonglv

Formerly Nobita.Kun
#3
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: