- 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. 
 
		 
 
		 
 
		 
 
		