View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16855 | Bug reports | File manager | public | 2020-11-23 17:07 | 2020-11-30 11:37 |
Reporter | netdeals | Assigned To | DenisChenu | ||
Priority | none | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 3.25.1 | ||||
Summary | 16855: Upload File MIME Type Check Error | ||||
Description | When a survey is set up for users to upload files of certain types, the user is confronted with the error "Sorry, unable to check extension of this file type." | ||||
Steps To Reproduce |
| ||||
Additional Information | In the survey file, I have specified PDF and XLSX formats, and both triggered the same error. The only workaround is to edit line 182 in the source file "\limesurvey\application\controllers\UploaderController.php" and turn $disableCheck to true. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | Version 3.25.1 build 201124 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox, ChrEdge | ||||
Database type & version | MySQL 5.6.10; innodb 1.2.10 | ||||
Server OS (if known) | Windows NT BUS-APPS 10.0 build 14393 (Windows Server 2016) AMD64 | ||||
Webserver software & version (if known) | Microsoft-IIS/10.0 | ||||
PHP Version | 7.4.10 | ||||
Your server seems to know ico file but not pdf or xlsx file ? Really strange … but it's a windows server ... You can force one with magic_database in config.php but don't know how to get one for windows (i test with an old Gnu/Linux/Debian9 and a magic_database from last Gnu/Linux/Fedora version) |
|
Strange maybe, but it doesn't look like adding the magic_file alone in config.php helps. I do not know how to set up the magic_database entry either. But before reaching out to sys admin for some much needed magic, I decided to wade into the source code. Thanks so much for your time and comment, Denis. Your effort is much appreciated. |
|
You're right … https://github.com/LimeSurvey/LimeSurvey/blob/8697d482691c59dd07b487085b42b5dfae0f4462/application/core/LSFileHelper.php#L43 don't send null at the 3rd param Thanks a lot for your report. I think i add a config.php to allow disable extension checking. ONLY with php since it can be a security issue … |
|
Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30755 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30756 |
|
@netdeals can you confirm the issue was fixed using this patch ? |
|
Fixed in Release 4.3.29+201130 |
|
LimeSurvey: 3.x-LTS c25ffd2b 2020-11-27 20:47 Details Diff |
Fixed issue 16855: Upload File MIME Type Check Error Dev: use getMimeType directly without extension Dev: test more simple on FileHelper |
Affected Issues 16855 |
|
mod - application/controllers/UploaderController.php | Diff File | ||
mod - application/core/LSFileHelper.php | Diff File | ||
LimeSurvey: master 9aa7ca63 2020-11-27 20:47 Details Diff |
Fixed issue 16855: Upload File MIME Type Check Error Dev: use getMimeType directly without extension Dev: test more simple on FileHelper Dev: cherry-picked |
Affected Issues 16855 |
|
mod - application/controllers/UploaderController.php | Diff File | ||
mod - application/core/LSFileHelper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-23 17:07 | netdeals | New Issue | |
2020-11-23 17:07 | netdeals | File Added: bug.tracker.upload.project.1.pdf.xlsx.png | |
2020-11-23 17:07 | netdeals | File Added: bug.tracker.upload.project.1.pdf.xlsx.lss | |
2020-11-24 17:59 | DenisChenu | Note Added: 60749 | |
2020-11-25 16:40 | netdeals | Note Added: 60757 | |
2020-11-25 16:40 | netdeals | File Added: image.png | |
2020-11-26 08:03 | DenisChenu | Assigned To | => DenisChenu |
2020-11-26 08:03 | DenisChenu | Status | new => assigned |
2020-11-26 08:05 | DenisChenu | Note Added: 60760 | |
2020-11-27 19:48 | DenisChenu | Changeset attached | => LimeSurvey 3.x-LTS c25ffd2b |
2020-11-27 19:48 | DenisChenu | Note Added: 60788 | |
2020-11-27 19:48 | DenisChenu | Resolution | open => fixed |
2020-11-27 19:50 | DenisChenu | Changeset attached | => LimeSurvey master 9aa7ca63 |
2020-11-27 19:50 | DenisChenu | Note Added: 60789 | |
2020-11-29 10:22 | DenisChenu | Status | assigned => ready for testing |
2020-11-29 10:22 | DenisChenu | Note Added: 60792 | |
2020-11-30 11:37 | lime_release_bot | Note Added: 60801 | |
2020-11-30 11:37 | lime_release_bot | Status | ready for testing => closed |