View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|16293||Bug reports||Survey taking||public||2020-05-18 17:23||2021-01-04 11:36|
|Summary||16293: Question Type: File Upload attached file is too big, no error message -> internal server error|
|Description||If the attached file is bigger than expected, the application will crash and it will raise an internal server error, see the big below.|
|Steps To Reproduce||1. Create Survey|
2. Create Question Group
3. Create Question with Question Type: File Upload
4. Preview or run the survey
5. Attach an file to the file upload which is bigger than 2048 KB
|Tags||No tags attached.|
|Complete LimeSurvey version number (& build)||irrelevant|
|I will donate to the project if issue is resolved||No|
|Database & DB-Version||irrelevant|
|Server OS (if known)|
|Webserver software & version (if known)|
sample1.heic (293,608 bytes)
Can I ask you for a dump of your php info?
Specifically, I am looking for these values:
I believe that your file was bigger than the post_max_size.
Still, wasn't able to get the same error message.
Also, at last, the file you uploaded on this ticket "sample1.heic" is smaller than 2M
Added a validation for empty $_POST and $_FILES, which is normally the case when post_max_size is exceeded. Without the validation, when post_max_size was exceeded, an "invalid extension" error was thrown or an HTTP 500 error (depending on debug mode).
Tested the issue before pulling the PR, Issue exist. Tested the issue after pulling the PR, I still get the error even after clearing cache.
Please refer the attachment for more details
The 500 error appears when uploading just the .heic file.
If uploading a regular file, the error should not appear.
Can you please confirm that?
Why the error happens on .heic files?
1 - The installation doesn't have the FileInfo extension
2 - The .heic file is not registered on the default "known extensions file" (framework/utils/fileExtensions.php).
Also the message shown is an advance message as
- The debug config is set to 1 or greater or the user is marked as force superadmin
1 - Enable FileInfo
2 - Add the .heic file to a "custom extensions" file.
The file should be a copy of the default "known extensions file" with new entries.
The file should be registred under the "magic_file" entry on the config file.
|I tested the issue happens only with the heic file|
This could be interesting to bring to the picture:
|Ok, not sure what is the current status of this one. I see in github that there are some issues with certain file extensions. It's pretty rare to have .heic files uploaded by users since Apple devices' photos are stored as .jpeg.|
It is not a bug.
If user enables Fileinfo it will work good.
If not, a workaround is to add heic as a custom extension.
Denis wrote something about that already here: https://github.com/LimeSurvey/LimeSurvey/pull/1421
The feature in pulll request is : allow to upload any file, now and in future.
To upload a new file type:
1. Need to be known by fileExtensions
2. Need to be known by OS `magic_database` : Fedora (my workstation) know heiv but not Debian 10 (my server)
3. Translation of file type to know extension : https://github.com/LimeSurvey/LimeSurvey/blob/master/framework/utils/fileExtensions.php
|Fixed in Release 4.4.0-RC2+210104|
|2020-05-18 17:23||JHoeck||New Issue|
|2020-05-18 17:23||JHoeck||Status||new => assigned|
|2020-05-18 17:23||JHoeck||Assigned To||=> cdorin|
|2020-05-18 17:23||JHoeck||File Added: fileupload_size_to_big_error.PNG|
|2020-05-18 17:23||JHoeck||File Added: sample1.heic|
|2020-05-18 17:24||cdorin||Priority||none => high|
|2020-05-18 17:24||cdorin||Status||assigned => confirmed|
|2020-05-18 17:24||cdorin||Zoho Sprints||=> |Yes||
||Zoho Sprints ID||=> 14469000000098001|
|2020-07-24 18:29||gabrieljenik||Note Added: 59084|
|2020-07-24 18:33||gabrieljenik||Note Edited: 59084||View Revisions|
|2020-07-24 18:34||gabrieljenik||Note Edited: 59084||View Revisions|
|2020-07-28 21:33||gabrieljenik||Note Added: 59138|
||Note Added: 59204|
||File Added: 16293_Fileupload_MaxSize.png|
|2020-08-11 21:55||gabrieljenik||Note Added: 59414|
||Note Added: 59556|
|2020-08-20 15:50||gabrieljenik||Note Added: 59560|
|2020-09-15 17:56||cdorin||Note Added: 59836|
|2020-09-15 17:56||cdorin||Assigned To||cdorin =>|
|2020-09-15 17:56||cdorin||Status||confirmed => feedback|
|2020-09-15 17:56||cdorin||Zoho Sprints||Yes => |Yes||
|2020-09-16 17:36||gabrieljenik||Note Added: 59850|
|2020-09-17 08:43||DenisChenu||Note Added: 59858|
|2021-01-04 11:36||lime_release_bot||Note Added: 61408|
|2021-01-04 11:36||lime_release_bot||Status||feedback => closed|
|2021-01-04 11:36||lime_release_bot||Resolution||open => fixed|