As I found out today, you can rename the extension of any file in q2a v1.5.3 and upload it via CKEditor to the server.
The file catching the upload is qa-wysiwyg-upload.php.
In my opinion, the real file content should be checked to verify that we really deal with an image - and nothing else.
To do this, you need to add the following code after line 101 of qa-wysiwyg-upload.php.
if (empty($message)) {
$fileImgCheck = getimagesize($file['tmp_name']);
switch ($fileImgCheck['mime']) {
case "image/gif":
case "image/jpeg":
case "image/png":
break;
default:
$message=qa_lang_sub('main/image_not_read', 'GIF, JPG, PNG');
break;
}
}
cheers, Kai
--
PS: line 83 is only English:
$message='Maximum upload size is '.number_format($maxsize/1048576, 1).'MB';
Maybe we can add a language string here for v1.5.4?