StudentTraineeCenter / stcblog-wp

MS Fluent based WordPress theme for studuj.digital blog.
https://studuj.digital
GNU General Public License v3.0
9 stars 1 forks source link

Unable to upload .zip (.mcworld) files #52

Open janzen01 opened 3 years ago

janzen01 commented 3 years ago

Hi, due to a problem discovered on Monday, I wanted to upload all the materials we have to the blog. Unfortunately, the blog does not accept .zip and .mcworld files for me. It reports an error during the check :(

image Lumen Energetická výzva.zip

Vilican commented 3 years ago

My recent commits did not fix that issue. Need someone to look further into this.

petrkucerak commented 3 years ago

@janzen01 I tested it and found out:

If you upload file in text editor, it causes error but if you upload file in special section in wp for uploading medias, everything is clear. So, I recommend you use second options in this moment and after we will fix it, I will let you know.

image

filiptronicek commented 3 years ago

Interesting seems like the problem could arise from the API between the media library and the server? Will look further at how different these are. @petrkucerak

petrkucerak commented 3 years ago

Please @petrkucerak test all plugins from blog

Elesaa commented 3 years ago

Any update on this? @petrkucerak your solution you showed here is not working.

petrkucerak commented 3 years ago

Notes from testing vol 1

Team @filiptronicek @kahy9

Uploading zip files 955 kB - Pass 7.04 MB - Error 3.01 MB - Error 2.03 MB - Error 1.89 MB - Pass 1.97 MB - Pass 2.00 MB - Error 1.99 MB - Pass => border is 2 MB

petrkucerak commented 3 years ago

hosting --; we tested it on other wedos hostings

filiptronicek commented 3 years ago

Maybe related:

filiptronicek commented 3 years ago

We have now established that this is most likely due to the unfiltered_upload permission in WordPress, which only admins by default have.

filiptronicek commented 3 years ago

Ok, not so quick. We have checked by adding this permission to a user (me) and I still had the same error. Specified file failed upload test

filiptronicek commented 3 years ago

A quick summary from testing today: (with @petrkucerak & @kahy9 )

  1. It looks like a permission problem - not sure which permission, but one of them, probably, who knows.
  2. It could be due to the firewall security rules assigning a less regulated list of actions to admins.
  3. It could be a plugin error, but the error appears only on users with the absent Administrator role.
  4. It is a core error, raised by wp-admin/includes/file.php here:
    // A properly uploaded file will pass this test. There should be no reason to override this one.
    $test_uploaded_file = 'wp_handle_upload' === $action ? is_uploaded_file($file['tmp_name']) : @is_readable($file['tmp_name']);
  5. We tested this on different hosts (including the same) and we couldn't reproduce the issue with any built-in user roles.
  6. The upload limit is (for non-admin users) 2MB. (1.99MB will pass)
  7. It could be caused by Wordpress making multiple file chunks each being 2MB in size.
petrkucerak commented 3 years ago

Notions for a discussion :

janzen01 commented 2 years ago

@petrkucerak This problem happened again with this file: Science Island 2021 - BBTNB.zip

I would be very happy if the problem will be fixed soon.

petrkucerak commented 1 year ago

https://www.reddit.com/r/Wordpress/comments/16hh8v5/nobody_except_the_admin_role_can_not_upload_zip/?utm_source=share&utm_medium=web2x&context=3