View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
15237 | Bug reports | Survey editing | public | 2019-09-05 16:37 | 2020-05-15 17:14 |
Reporter | FreshLemonUser | Assigned To | DenisChenu | ||
Priority | none | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Product Version | 3.17.x | ||||
Fixed in Version | 3.17.x | ||||
Summary | 15237: I can´t Upload 3gpp, amr, aac audio files using File Upload Question | ||||
Description | Hello Dear Limesurvey Team, i would like to receive some help with the Limesurvey configuration, i need to upload 3gpp, amr, aac files using a File Upload Question but we coudn´t, each file shows a different error. i´ve already adjust the configuration on the question: Question: Upload Files aac case: 500: Error interno del servidor - Unable to check mime type of files, please activate FileInfo on server. I already have enable the fileinfo extensión on php 7.2 fileinfo I´ll really appreciate your help i´ve already posted it on the IRC chat and the suggested me to publish it as a bug. Please can you point me on the rigth direction? Thanks in advanced. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 12 | ||||
Complete LimeSurvey version number (& build) | Version 3.17.15+190903 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | 69.0 Firefox Release September 3, 2019 | ||||
Database type & version | mariadb-5.5.60-1.el7_5.x86_64 | ||||
Server OS (if known) | Operating System: CentOS Linux 7 (Core) - Architecture: x86-64 | ||||
Webserver software & version (if known) | Server version: Apache/2.4.6 (CentOS) Server built: Jul 29 2019 17:18:49 | ||||
PHP Version | PHP 7.2.22 (cli) (built: Aug 28 2019 09:29:33) ( NTS ) | ||||
related to | 15624 | closed | File Upload not working for iOS 13.2 |
Missing mime types in the code base? |
|
ollehar: Sorry, what should i do? |
|
The 500 error are only here with debug>1 and for super-admin. The file list is here : https://github.com/LimeSurvey/LimeSurvey/blob/e749eddfea5cebf86a72e408d1c4dafdaf7fd5ae/framework/utils/fileExtensions.php#L14 |
|
PS : code to get mime : https://github.com/LimeSurvey/LimeSurvey/blob/e749eddfea5cebf86a72e408d1c4dafdaf7fd5ae/framework/utils/CFileHelper.php#L328 Maybe … potential big issue , quick solution is to allow disable mime type checking … |
|
Can you upload here 3 light file aac, 3gp and amr ? And can you check locally on your server with |
|
Hello sear DenisChenu: I´ll attaching sample Audio Files, 'debug'=>1, Uploading an ACC file: Uploading a m4a file: Uploading an AMR file:
Uploading 3gp file:
Uploading 3gpp file
In https://github.com/LimeSurvey/LimeSurvey/blob/e749eddfea5cebf86a72e408d1c4dafdaf7fd5ae/framework/utils/fileExtensions.php#L14 we can find aac and 3gp 'audio/x-aac'=>'aac', mime types: 1.amr 2.aac 3.m4a 4.3gp 5.3gpp file 1.amr --mime-type1.amr: application/octet-stream #file 2.aac --mime-type #file 3.m4a --mime-type file 4.3gp --mime-type4.3gp: application/octet-stream file 5.3gpp --mime-type5.3gpp: video/3gpp Thanks in advanced. Best regards a FreshLemonUser |
|
But the most strange are Send a png or jpg file work or not ? And can you check an .ico file (maybe this one) to upload (and to file --mimetype) About fileInfo : can you send phpinfo as html file ? |
|
OK, Your fileinfo is OK … |
|
Too insecure IMO. |
|
Looks like this is an issue for the Yii team? They need to add the missing mime types in their file. |
|
@ollehar : no
Alternate resolution :
It's the reason i make a pull request and not a commit. |
|
for the alternative fileInfo file @FreshLemonUser And
|
|
Correct, CentOS7 "file-libs" uses /usr/share/misc/magic.mgc as well. For reference the current package of "file-libs". |
|
How is the OS magic file relevant if Yii has a hardcoded list anyway? |
|
@ollehar: I had the impression that Denis wants to implement a override via this pullrequest. |
|
PHP7.3 (on Fedora) using PHP7 mimetype file VS amr file |
|
@jelo : need 2 override:
Not the same for both |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=29098 |
|
OK, Now need updating manual … |
|
Manual updated @cdorin : unsure of the best place for config ? Good page, but maybe didn't need a specific title ? |
|
Fixed in Release 3.17.17+190918 |
|
LimeSurvey: master ab4bd518 2019-09-06 10:19 Details Diff |
Dev: Throw error about MimeType only without FileInfo Dev: related issue 15237 |
Affected Issues 15237 |
|
mod - application/controllers/UploaderController.php | Diff File | ||
LimeSurvey: master ebd6eb63 2019-09-06 14:38
Committer: Details Diff |
Fixed issue 15237: Upload 3gpp, amr, aac audio files using File Upload Question (#1318) Fixed issue 15237: Upload 3gpp, amr, aac audio files using File Upload Question Dev: allowing to set mime database from config Dev: allowing to set magic file (extension by magic type) Dev: review file to check : ico can have image/vnd.microsoft.icon mime type (not in system.utils.fileExtensions) Dev: use config['magic_database'] only if needed Dev: more comment Dev: Yii code to LS code (and make CodeFactor and @ollehar happy) Dev: fix return type (from Yii) Dev: some other function call fix, Dev: log as error when can find extension for mime type |
Affected Issues 15237 |
|
mod - application/config/config-defaults.php | Diff File | ||
mod - application/controllers/UploaderController.php | Diff File | ||
add - application/core/LSFileHelper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-09-05 16:37 | FreshLemonUser | New Issue | |
2019-09-05 16:57 | ollehar | Note Added: 53477 | |
2019-09-05 17:26 | FreshLemonUser | Issue Monitored: FreshLemonUser | |
2019-09-05 17:26 | FreshLemonUser | Note Added: 53478 | |
2019-09-05 18:09 | DenisChenu | Note Added: 53479 | |
2019-09-05 18:10 | DenisChenu | Note Added: 53480 | |
2019-09-05 18:19 | DenisChenu | Assigned To | => DenisChenu |
2019-09-05 18:19 | DenisChenu | Status | new => feedback |
2019-09-05 18:19 | DenisChenu | Note Added: 53481 | |
2019-09-05 20:07 | FreshLemonUser | File Added: 1.amr | |
2019-09-05 20:07 | FreshLemonUser | File Added: 2.aac | |
2019-09-05 20:07 | FreshLemonUser | File Added: 3.m4a | |
2019-09-05 20:07 | FreshLemonUser | File Added: 4.3gp | |
2019-09-05 20:07 | FreshLemonUser | File Added: 5.3gpp | |
2019-09-05 20:07 | FreshLemonUser | Note Added: 53484 | |
2019-09-05 20:07 | FreshLemonUser | Status | feedback => assigned |
2019-09-06 07:39 | DenisChenu | Note Added: 53485 | |
2019-09-06 08:21 | DenisChenu | Changeset attached | => LimeSurvey master ab4bd518 |
2019-09-06 08:21 | DenisChenu | Note Added: 53486 | |
2019-09-06 10:22 | ollehar | Note Added: 53487 | |
2019-09-06 10:25 | ollehar | Note Added: 53488 | |
2019-09-06 10:48 | DenisChenu | Note Added: 53493 | |
2019-09-06 10:51 | DenisChenu | Note Added: 53495 | |
2019-09-06 11:13 | jelo | Note Added: 53498 | |
2019-09-06 11:14 | ollehar | Note Added: 53499 | |
2019-09-06 11:43 | jelo | Note Added: 53500 | |
2019-09-06 11:57 | DenisChenu | Note Added: 53501 | |
2019-09-06 12:07 | DenisChenu | Note Added: 53502 | |
2019-09-06 12:38 |
|
Changeset attached | => LimeSurvey master ebd6eb63 |
2019-09-06 12:38 | DenisChenu | Note Added: 53503 | |
2019-09-06 12:38 | DenisChenu | Resolution | open => fixed |
2019-09-06 14:50 | DenisChenu | Note Added: 53504 | |
2019-09-06 15:08 | DenisChenu | Status | assigned => resolved |
2019-09-06 15:08 | DenisChenu | Fixed in Version | => 3.17.x |
2019-09-06 15:08 | DenisChenu | Note Added: 53505 | |
2019-09-18 16:18 | lime_release_bot | Note Added: 53638 | |
2019-09-18 16:18 | lime_release_bot | Status | resolved => closed |
2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |
2020-05-15 17:14 | DenisChenu | Relationship added | related to 15624 |
2021-08-02 22:53 | guest | Bug heat | 10 => 12 |