• Hi!

    We’ve just hit a snag while uploading password protected Excel files (xlsx).
    If we upload a non-protected file, the upload succeeds.
    But if we try uploading a password protected file we get:

    Workbook1-XLSX-pass.xlsx
    Sorry, this file type is not permitted for security reasons.

    Do you have any idea where we could start looking to resolve this issue?

    King regards,
    Mitja

Viewing 5 replies - 1 through 5 (of 5 total)
  • That message is coming from your server – not WordPress. Try contacting your hosts and having a word with them about this issue.

    Thread Starter mmihelic

    (@mmihelic)

    We are the host, hosting a WordPress network of 10k+ sites for our education related institutions (schools, universities,…).
    From what I can tell, the error originates from:
    /opt/wordpress/wp-admin/includes/file.php
    and the line that print the error is:
    353 return call_user_func_array( $upload_error_handler, array( &$file, __( 'Sorry, this file type is not permitted for security reasons.' ) ) );

    Do you propose that the server denies the upload and WordPress just reports it?
    Would the message originate from Apache or PHP?

    Do you propose that the server denies the upload and WordPress just reports it?

    Yes – exactly that.

    Would the message originate from Apache or PHP?

    Best guess: Apache.

    Thread Starter mmihelic

    (@mmihelic)

    Thanks, I’ll start on the Apache side.

    Thread Starter mmihelic

    (@mmihelic)

    It was not an Apache issue. I delved into the network site at work and came to
    $real_mime = finfo_file( $finfo, $file );

    This is line 2319 in
    /opt/wordpress/wp-includes/functions.php

    Thanks to supernovia form the www.ads-software.com forum I now know, that since version 4.7.1 WordPress implemented a more strict MIME type checking. See here.

    I wrote a post about it here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t upload password protected Excel files’ is closed to new replies.