View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
12150Bug reportsImport/Exportpublic2017-03-07 11:01
Reporterbrammeleman Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.63.x 
Fixed in Version2.64.x 
Summary12150: Download link of "file answer" referenced by user supplied file name
Description

If a survey contains two or more file upload questions, there is a chance that two different documents are uploaded with the same file name. For example when the participant selects files from several directories. Once that happens, it's not possible to download all files from the "Display responses" view.

Steps To Reproduce
  1. On your client machine, prepeare two different documents with the same name:

    $ mkdir /tmp/dir1 /tmp/dir2
    $ echo AAAAA > /tmp/dir1/document.pdf
    $ echo BBBBB > /tmp/dir1/document.pdf
  2. Create a survey with two file upload questions.

  3. Create a token / activate survey / initialize tokens etc

  4. Execute the survey

  5. Answer the first question by uploading /tmp/dir1/document.pdf

  6. Answer the second question by uploading /tmp/dir2/document.pdf

  7. Finish the survey

  8. Go to 'Display responses' in the admin interface

  9. Download the answer of the first question by clicking 'download.pdf'

  10. Download the answer of the second question by clicking 'download.pdf' (second link)

  11. Display the downloaded files:

    $ cat document.pdf
    BBBBB
    $ cat document\ \(1\).pdf 
    BBBBB

Expected result:

$ cat document.pdf
AAAAA
$ cat document\ \(1\).pdf 
BBBBB
Additional Information

The files are referenced by the user defined file name, while they should be referenced by the (hashed) filename as stored on disk on the server.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)Version 2.62.2+170203
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.5.54-0ubuntu0.14.04.1-log - (Ubuntu)
Server OS (if known)Ubuntu 14.04.5 LTS
Webserver software & version (if known)Apache/2.4.7 (Ubuntu)
PHP VersionPHP 5.5.9-1ubuntu4.21

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2017-02-28 13:24

administrator   ~43092

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=22392

c_schmitz

c_schmitz

2017-02-28 13:24

administrator   ~43093

Good catch - thank you.

c_schmitz

c_schmitz

2017-03-07 11:01

administrator   ~43181

Version 2.64.0 released

Related Changesets

LimeSurvey: master 0c4ebb9b

2017-02-28 14:24

c_schmitz


Details Diff
Fixed issue 12150: Download link in responses may download wrong file if same file name was uploaded twice Affected Issues
12150
mod - application/controllers/admin/responses.php Diff File
mod - application/models/Response.php Diff File
mod - application/models/SurveyDynamic.php Diff File

Issue History

Date Modified Username Field Change
2017-02-23 13:29 brammeleman New Issue
2017-02-28 13:24 c_schmitz Assigned To => c_schmitz
2017-02-28 13:24 c_schmitz Status new => assigned
2017-02-28 13:24 c_schmitz Changeset attached => LimeSurvey master 0c4ebb9b
2017-02-28 13:24 c_schmitz Note Added: 43092
2017-02-28 13:24 c_schmitz Resolution open => fixed
2017-02-28 13:24 c_schmitz Status assigned => resolved
2017-02-28 13:24 c_schmitz Fixed in Version => 2.64.x
2017-02-28 13:24 c_schmitz Note Added: 43093
2017-03-07 11:01 c_schmitz Note Added: 43181
2017-03-07 11:01 c_schmitz Status resolved => closed