- Fixed a spelling error in search.php when there is no search criteria
- Adding a quick search feature to the header bar (http://www.bluestatic.org/bugs/showreport.php?bugid=57)
- Fixed an occurence in header.tpl where the $stylevar align wasn't used, but a hard-coded one was
+- Only allow JPG, JPEG, PNG, and GIF attachments to be displayed inline because all other types could lead to an XSS attack
1.1.3
===============================
ob_clean();
ob_end_clean();
-
-if ($funct->fetch_extension($attachment['filename']) != 'txt')
+
+// only allow certain images to be displayed inline because all other types are a potential XSS issue waiting to happen
+if (in_array(strtolower($funct->fetch_extension($attachment['filename'])), array('jpg', 'jpeg', 'png', 'gif')))
{
header("Content-Disposition: inline; filename=$attachment[filename]");
header("Content-transfer-encoding: binary");