We're having the same issue. Had to comment out this as a temp fix:
https://github.com/osTicket/osTicket/blob/develop/include/class.forms.php#L3975-L3977
jothie , we had the same issue with saving emails on Mac vs windows. The difference was that Mac uses .eml files which work ok, Windows uses .msg, which does not work.
I'm not sure if you're having the same problem.
we have the same issues after updating to v1.17.3, we used version 1.17.2
melgsondouglas
solved by activating the fileinfo in the php manager
Everyone,
Here is the patch:
Cheers.
KevinTheJedi
The problem ist that $file['type'] and FileObject::mime_type($file['tmp_name']) do not return the same result.
in case of a zip-file: string(28) "application/x-zip-compressed" string(24) "application/octet-stream"
samplefile attached
bauernbengel
Yes, I have seen this with someone else, however I’m unable to replicate this with ZIP files in my instance. What version of PHP are you using? What browser are you using? What OS are you using when uploading the file?
KevinTheJedi do you used my ZIP-file?
osTicket-Version osTicket FREE v1.17.3 (ca95150) Patch-1 — Deutsche Version — Aktuell Server-Software Apache/2.4.51 (Unix) MySQL-Version 10.3.32 PHP-Version 8.0.23
Browser: Opera,Vivaldi,Chrome OS Win10/Win11
Ugly Fix:
class.forms.php replace the function
static function isValidFile($file) { // Make sure mime type is valid #var_dump($file['type'], FileObject::mime_type($file['tmp_name']));die; #if (!empty($file['type']) && strcasecmp(FileObject::mime_type($file['tmp_name']), # $file['type']) !== 0) # return false; // Check invalid image hacks if ($file['tmp_name'] && stripos($file['type'], 'image/') === 0 && !exif_imagetype($file['tmp_name'])) return false; return true; }
If I were you I’d install a vanilla osTicket and retest there. We do not support the German version. They make customizations to the code so it’s not official osTicket.
Also, yes, I tried your file and worked without issue.