Same Problem here after updating from 1.17.1 to 1.17.3. I can attach a txt or a jpg file, but not for example a zip.
Receiving a zip from a customer works.

    jothie Geoff-B

    Add the File Type (eg. .zip) to the Additional File Type Filters setting to the field and retest. For Ticket Details filed this is Admin Panel > Settings > Tickets > Ticket Attachment Settings > Config.

    Cheers.

    i have three types in this field ".fil, .zip, .pfc", but the error occurs when i insert a zip file.

    It happens after update to 17.3 (from 17.1).

      jothie

      Interesting, I'm running v1.17.3 and able to upload ZIP just fine. Are you missing any PHP extensions from Admin Panel > Dashboard > Information? Can you upload an example ZIP to this forum for us to test?

      Cheers.

      jothie

      We do not go to 3rd party sites to view things, sorry. You can upload any screenshots directly to this forum.

      Cheers.

      jothie

      I was able to upload this example just fine. How about right click the page, click Inspect, click Network, check the box to Preserve Logs, upload the file, click the request in the Network tab, click Response, and see what the response says.

      Cheers.

      jothie

      Yea, you can take screenshots and upload those instead. Or make a GIF and upload that.

      Cheers.

      You're right, i have commented out this lines:
      // Make sure mime type is valid
      //if (strcasecmp(FileObject::mime_type($file['tmp_name']),
      // $file['type']) !== 0)
      // return false;
      and it works.
      It have checked the old source 1.17.1 -> This lines seems to be new in 1.17.2 or 1.17.3.

      Many thanks for your help.

        jothie

        Yes, it's a security patch. But it's very strange that I'm able to upload this and you are not. I wonder what the difference is here.. 🤔

        Cheers.

        jothie

        Can you please create a PHP file in your osTicket directory, paste the following content, visit the file in the browser, and tell me what the page displays?

        <?php
        var_dump('finfo_open exists: ', function_exists('finfo_open'));

        Cheers.

        jothie

        That would be the only difference but you have that method as well so I'm not sure why you can't but I can without making any changes...so odd. Can you download the example you uploaded to the Forum and retest with the downloaded ZIP? I wonder if uploading it here fixed the MIME Type.

        Cheers.

        Downloaded and tested - no change.
        But i have tested it on a mac - there it works.
        But on every W11 PC i tested -> failed.