?
Referenced as Pull Request for: # 27730
avatar EmilMassey
EmilMassey
30 Jan 2020

Steps to reproduce the issue

In /administrator/index.php?option=com_media upload file(s) larger than allowed limit

Expected result

Error message: Uploaded file(s) are larger than allowed limit.

Actual result

Error message: You have tried to upload file(s) that are not safe.

System information (as much as possible)

Server

Docker image php:7.3-apache

Client:

  • Ubuntu, Chromium 79.0.3945.130
    or
  • MacOS, Safari

Additional comments

#15466 was based on incorrect assumption, that JInputFiles get() returns null only if unsafe file was uploaded. But it is also null if upload_max_filesize is less than uploaded file(s) (at least in my environment).

In the controller, there are some checks if the file is too large to upload, but they are called too late in the process.
administrator/components/com_media/controllers/file.php

avatar EmilMassey EmilMassey - open - 30 Jan 2020
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jan 2020
avatar Quy
Quy - comment - 30 Jan 2020

Is the uploaded file of type zip? If yes, see #26408.

avatar EmilMassey
EmilMassey - comment - 30 Jan 2020

It’s not, it’s just a regular jpeg. I haven’t found similar issue on GitHub.

In my environment, $_FILES global array is empty when file(s) exceed the limit and this is the reason files->get() returns nothing.

avatar SharkyKZ SharkyKZ - change - 30 Jan 2020
Status New Confirmed
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-01-30 21:41:12
Closed_By joomla-cms-bot
avatar SharkyKZ SharkyKZ - change - 30 Jan 2020
Closed_By joomla-cms-bot SharkyKZ
avatar joomla-cms-bot joomla-cms-bot - close - 30 Jan 2020
avatar joomla-cms-bot
joomla-cms-bot - comment - 30 Jan 2020

Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/27717

avatar SharkyKZ
SharkyKZ - comment - 30 Jan 2020

Please test PR #27730.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27717.

Add a Comment

Login with GitHub to post a comment