Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
IDProjectCategoryView StatusLast Update
15874Feature requestsSurvey takingpublic2022-05-03 18:07
ReporterGuernseyResearch Assigned ToJHoeck  
Status closedResolutionfixed 
Summary15874: Bad control of file extension list : space inside list

This is similar to ID=15002 and a problem we had with LS 3 last summer but resolved at the server level.
Our LS4 is installed in a peer directory to the LS3 installation that is working fine. Therefore I believe the server and PHP are fine.

We cleared everything and have done a completely fresh load of LS4 (Version 4.1.4+200214 ) and cannot upload files.
We are using PHP 7.3.11 on Linux

fileinfo support enabled
libmagic 533

TagsNo tags attached.
Bug heat18
Story point estimate
Users affected %


has duplicate 16146 closed Bug reports File upload, space in list of allowed file types 
related to 15898 closedcdorin Bug reports Issues uploading files during survey 




2020-02-13 22:14

reporter   ~55990

The problem is in the supplied UploaderController.php file.
Replaced the file with the LS3 one and have fixed the problem.
However, this puzzles me as it should have worked with the freshly installed file.



2020-02-13 22:42

reporter   ~55991

Actually not fixed - only partly fixed. But it appears the problem is in that file. I cannot JUST replace the file. It appears to be in the MIME checking section



2020-02-14 01:16

reporter   ~55992

More data - the file from LS3 will accept the file, but the save button does not work.
the file from LS4 will not accept the file. Because these installations are in peer directories and using the same PHP from the server it has to be a problem in the LS4 and not in the PHP itself, right? This has me stumped.



2020-02-14 07:26

developer   ~55994

But it appears the problem is in that file.

What file ?



2020-02-14 11:08

administrator   ~56005

  1. Screenshot of error message?
  2. Which files did you try to upload?


2020-02-14 17:13

reporter   ~56026

From the beginning:

We have an instance of LS3 (Version 3.22.4+200212 ) that is working perfectly. In a peer directory we have an instance of LS4 (Version 4.1.4+200214 ) that was a fresh install to an empty database. Everything is running on the same server with the same PHP and the same database server.

When I attempt to upload ANY file on LS4 it gives me an error that it cannot handle a file with that extension. See the screenshot LS4file.jpg below. I took the /application/controllers/uploaderController.php from the version 3 site and copied it to the version 4 site. What I get is screenshot LS3file.jpg when I try to upload a file. It appears to understand the extension correctly. However, because the uploader.php file is not really for LS4 the "Save Changes" button does not work.

I compared the two uploader.php files looking for something that might be blocking the upload and tried a variety of edits thinking I could isolate the specific cause, but I have not been successful.

Because my LS3 works fine I think the PHP settings are all correct. Where else should I look?

LS4file.jpg (45,201 bytes)   
LS4file.jpg (45,201 bytes)   
LS3file.jpg (69,421 bytes)   
LS3file.jpg (69,421 bytes)   


2020-02-14 18:36

developer   ~56028

This error is due to JS not to PHP.

But it appears the problem is in that file.

Bad comprehension ; you spoke for UploaderController.php, not for a file to upload.

There is something in js console ? (We have a forum post with this issue too : js issue, no PHP)



2020-02-14 19:16

reporter   ~56029

Sorry - that is why I repeated everything.
Do you have a reference for the post "We have a forum post with this issue too : js issue, no PHP"
I cannot find it.

What would I look for to fix the problem? Is there a solution?

Thank you for the ongoing help.



2020-02-15 11:44

developer   ~56033

Before see the page with the upload question,
Activate console (F12) on your browser,
See if there are error.



2020-02-15 15:59

reporter   ~56034

Attached is the error. I cannot find the directory within /tmp where spectrum.js is supposed to be located. This is a fresh install of Version 4.1.4+200214. The directory within /tmp did not exist.

I did a search and found spectrum.js located in /assets/packages/themeoptions-core.
I made the directory in /tmp and added a copy of spectrum.js

Now the error is different as seen in uploaderror2.jpg

You can access the survey at

I am using Windows 10 with Firefox 73. I am not an expert in this so I am really stuck.

uploaderror.jpg (283,304 bytes)
uploaderror2.jpg (147,835 bytes)


2020-02-15 18:12

developer   ~56035

Browser related issue
Checked with Firefox : OK



2020-02-15 18:53

reporter   ~56036

I don't understand. Which version of Firefox? I see in the responses that the file did actually upload.

Note: this was after I manually add the directory and script file. (uploaderror.jpg)

Did not work with Google Chrome ( Version 80.0.3987.106 (Official Build) (64-bit) ), see attached
It does not work with MS IE, It does not even get to the upload question.
MS Edge was the same as Chrome.
or with my updated Firefox (73.0 (64-bit)). see attached

We cannot ask customers to use alternate browsers.

I tried changing the theme and it had no impact

upload-chrome.png (87,148 bytes)   
upload-chrome.png (87,148 bytes)   
upload-firefox.jpg (201,443 bytes)
uploaderror-2.jpg (283,304 bytes)


2020-02-15 19:03

reporter   ~56037

We just tried Chrome on a 32-bit machine and had the same error.



2020-02-15 19:46

developer   ~56038

Firefox 68.5.0esr (64 bits) (Debian)
Midori 7.0

BUT : ok with png, not with jpg.

Can you test with gif, pdf, png etc .... files too ? Maybe only jpg ? (jpg == jpeg)



2020-02-15 19:56

reporter   ~56039

We use jpg and dif mostly for this survey. Occasionally a tiff or png
I have been testing with jpg and pdf as those are key to our use. They do not load.



2020-02-18 00:14

reporter   ~56063

The default file types for the file upload question for a new survey have spaces between the file types, which is not correct. Once you change the allowable file types they will be used as the default for future surveys. Because there was a space after the first file type it was the only one allowed. I needed to remove the spaces between the file types. Once the list of default file types was fixed it will work for all future surveys. It appears to remember the list you prefer even when creating a new survey.

There is a need to ensure that the defaults for a NEW INSTALL do not have spaces.

default.jpg (50,690 bytes)   
default.jpg (50,690 bytes)   


2020-02-18 08:02

developer   ~56064

Great !

My opinion : we must explode and trim !

Thanks a lot, i take the issue



2020-02-18 10:03

administrator   ~56065

Nice found



2020-02-18 17:37

reporter   ~56076

LS 3 does this correctly even when there are spaces in the extension list.



2020-02-18 20:59

developer   ~56079

@cdorin : sorry, i only have my laptop actually

I can not fix it without buold and don't want to setup builder on my little laptop ....

Fix is
return col || ext.toLowerCase().trim() === item.toLowerCase().trim();




2020-02-19 10:25

updater   ~56083

Good catch @GuernseyResearch!

I can confirm that spaces caused no hamr at LS 3 so this is a regression that should be fixed soon. Otherwise there will be lots of support requests.



2020-02-19 10:28

developer   ~56084

@Mazi : if you have yarn and composer : see the line to fix if you can do a pull request :)



2020-02-21 13:47

reporter   ~56137

I too have this issue using LS 4.1.6+200220

Is there a file that can be edited to delete the spaces in the extension list, as when i try to edit within the question editor it always defaults back when saving (this also means i cannot add media file options (eg mp4, 3gp etc) like i could in a precious version (LS 3x.

In addition to this the file upload limit also keeps defaulting to 10240, when it should be 200k on my install (240M + on PHP upload limits)

Never had any issues using a earlier version of LS.



2020-05-06 10:11

developer   ~57568

Related to :)

Issue History

Date Modified Username Field Change
2020-02-13 21:44 GuernseyResearch New Issue
2020-02-13 22:14 GuernseyResearch Note Added: 55990
2020-02-13 22:42 GuernseyResearch Note Added: 55991
2020-02-14 01:16 GuernseyResearch Note Added: 55992
2020-02-14 07:26 DenisChenu Note Added: 55994
2020-02-14 07:26 DenisChenu Project Feature requests => Bug reports
2020-02-14 11:08 ollehar Note Added: 56005
2020-02-14 11:08 ollehar Status new => feedback
2020-02-14 11:08 ollehar Complete LimeSurvey version number (& build) => latest dev
2020-02-14 17:13 GuernseyResearch File Added: LS4file.jpg
2020-02-14 17:13 GuernseyResearch File Added: LS3file.jpg
2020-02-14 17:13 GuernseyResearch Note Added: 56026
2020-02-14 17:13 GuernseyResearch Status feedback => new
2020-02-14 18:36 DenisChenu Note Added: 56028
2020-02-14 19:16 GuernseyResearch Note Added: 56029
2020-02-15 11:44 DenisChenu File Added: Capture d’écran du 2020-02-15 11-42-40.png
2020-02-15 11:44 DenisChenu Note Added: 56033
2020-02-15 15:59 GuernseyResearch File Added: uploaderror.jpg
2020-02-15 15:59 GuernseyResearch File Added: uploaderror2.jpg
2020-02-15 15:59 GuernseyResearch Note Added: 56034
2020-02-15 18:12 DenisChenu File Added: Capture d’écran du 2020-02-15 18-11-31.png
2020-02-15 18:12 DenisChenu Note Added: 56035
2020-02-15 18:53 GuernseyResearch File Added: upload-chrome.png
2020-02-15 18:53 GuernseyResearch File Added: upload-firefox.jpg
2020-02-15 18:53 GuernseyResearch File Added: uploaderror-2.jpg
2020-02-15 18:53 GuernseyResearch Note Added: 56036
2020-02-15 19:03 GuernseyResearch Note Added: 56037
2020-02-15 19:46 DenisChenu Note Added: 56038
2020-02-15 19:56 GuernseyResearch Note Added: 56039
2020-02-18 00:14 GuernseyResearch File Added: default.jpg
2020-02-18 00:14 GuernseyResearch Note Added: 56063
2020-02-18 08:02 DenisChenu Note Added: 56064
2020-02-18 08:02 DenisChenu Assigned To => DenisChenu
2020-02-18 08:02 DenisChenu Status new => assigned
2020-02-18 08:02 DenisChenu Summary Cannot upload any file type in file upload question using LS 4.1 => Bad control of file extension list
2020-02-18 10:03 ollehar Note Added: 56065
2020-02-18 17:37 GuernseyResearch Note Added: 56076
2020-02-18 20:51 DenisChenu Assigned To DenisChenu => cdorin
2020-02-18 20:59 DenisChenu Note Added: 56079
2020-02-19 10:25 Mazi Note Added: 56083
2020-02-19 10:28 DenisChenu Note Added: 56084
2020-02-21 00:56 jelo Relationship added related to 15898
2020-02-21 13:47 russell37uk Note Added: 56137
2020-02-22 20:31 cdorin Priority none => normal
2020-02-22 20:31 cdorin Status assigned => confirmed
2020-03-13 18:50 c_schmitz Project Bug reports => Feature requests
2020-05-06 10:11 DenisChenu Assigned To cdorin => JHoeck
2020-05-06 10:11 DenisChenu Status confirmed => feedback
2020-05-06 10:11 DenisChenu Note Added: 57568
2020-05-06 10:45 DenisChenu Relationship added has duplicate 16146
2020-05-06 10:46 DenisChenu Summary Bad control of file extension list => Bad control of file extension list : space inside list
2021-08-19 16:10 galads Status feedback => resolved
2021-08-19 16:10 galads Resolution open => fixed
2022-05-03 18:07 c_schmitz Status resolved => closed