Fixed XF\Http\Upload::analyzeImage does not fully respect getImageExtensionMap

Xon

Well-known member
Affected version
2.2.5
XF\Http\Upload::analyzeImage compares the uploaded file's extension against the map returned by getImageExtensionMap but then on the comparing the file's actual image type via getimagesize; a hard-coded list is used.

Using array_flip will generate a map of IMAGETYPE_* constants which can be trivially checked instead of a hard-coded switch statement.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.6).

Change log:
When analysing images, check image type against image extension map
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom