View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
18353Bug reportsImport/Exportpublic2022-09-19 10:55
ReporterEmilieClx Assigned To 
PrioritynoneSeverityminor 
Status ready for code reviewResolutionopen 
Product Version5.3.x 
Summary18353: Unable to upload an xml file
Description

As described on the French forum in the topic https://forums.limesurvey.org/forum/french-forum/128133-difficult%C3%A9s-avec-une-question-de-type-t%C3%A9l%C3%A9chargement, I read the doc manual.limesurvey.org/Questiontype-_File_upload.
I created a question upload where the allowed filetype is xml. I added it in the config file for the variable allowedfileuploads.
The upload is allowed in php.ini and php-fpm
I restarted nginx.
When I want to upload a file of type xml, I have the error "Sorry, impossible to validate the extension for the file type text/xml.".
We added the line 'text/xml'=>'xml', to the file application/core/utils/fileExtensions.php
The download is now possible. It seems that text/xml is not the official mimetype of xml : github.com/LimeSurvey/LimeSurvey/blob/32...eExtensions.php#L593
Thanks in advance for fixing this bug.

Steps To Reproduce

Steps to reproduce

I created a question upload where the allowed filetype is xml.
I added it in the config file for the variable allowedfileuploads. The upload is allowed in php.ini and php-fpm
I restarted nginx.
I try to upload a file of type xml
I have the error "Sorry, impossible to validate the extension for the file type text/xml."
We added the line 'text/xml'=>'xml', to the file application/core/utils/fileExtensions.php
The download is now possible.

Expected result

upload an xml file

Actual result

The download is now possible but it seems that text/xml is not the official mimetype of xml : github.com/LimeSurvey/LimeSurvey/blob/32...eExtensions.php#L593

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 5.3.26+220720
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL
Server OS (if known)Your own server or LimeSurvey Cloud: debian 5.10.0-16-amd64 x86_64
Webserver software & version (if known)
PHP Version7.4

Relationships

related to 18347 ready for code review Unable to check extension of this file type image/svg. 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-09-19 10:39

developer   ~71811

Valid xml shown as text/xml in last debian :)

note.xml (164 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
note.xml (164 bytes)   
DenisChenu

DenisChenu

2022-09-19 10:55

developer   ~71812

master : https://github.com/LimeSurvey/LimeSurvey/pull/2613

Issue History

Date Modified Username Field Change
2022-09-15 12:40 EmilieClx New Issue
2022-09-15 12:54 DenisChenu Assigned To => DenisChenu
2022-09-15 12:54 DenisChenu Status new => assigned
2022-09-15 12:57 DenisChenu Relationship added related to 18347
2022-09-19 10:39 DenisChenu Note Added: 71811
2022-09-19 10:39 DenisChenu File Added: note.xml
2022-09-19 10:39 DenisChenu Bug heat 0 => 2
2022-09-19 10:54 DenisChenu Assigned To DenisChenu =>
2022-09-19 10:54 DenisChenu Status assigned => ready for code review
2022-09-19 10:55 DenisChenu Additional Information Updated
2022-09-19 10:55 DenisChenu Additional Information Updated
2022-09-19 10:55 DenisChenu Note Added: 71812