View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06133Bug reportsImport/Exportpublic2012-06-07 11:02
Reporterjmk Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Fixed in Version1.92+ 
Summary06133: Race condition with concurrent upload of similar "survey structure"
Description

When two admins upload a file with the same name at the same time one of the upload will fail.

The same problem may exists with other kind of uploads (questions, tokens, users).

Steps To Reproduce

Take two users A and B. Both users previously saved a survey structure named with the same name on their desktop (say "foo.csv").

User A log in as admin / user B log in as admin

User A create a new survey and uploads foo.csv / User B does the same concurrently.

Additional Information

Sorry no patch :) but the following may correct the issue:

in admin/http_importsurvey.php

Change

$the_full_file_path = $tempdir . "/" . $_FILES['the_file']['name'];

with

$the_full_file_path = $tempdir . "/" . $_FILES['the_file']['tmp_name'];

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)1.92
I will donate to the project if issue is resolvedNo
Browser
Database type & version irrelevant / mysql
Server OS (if known) irrelevant / linux
Webserver software & version (if known) irrelevant / apache
PHP Version irrelevant / php 5.0

Users monitoring this issue

There are no users monitoring this issue.

Activities

jmk

jmk

2012-05-26 11:47

reporter   ~18911

Sorry I took a bad revision ....

The workaround should be:

$the_full_file_path = $tempdir . "/" . basename($_FILES['the_file']['tmp_name']);

c_schmitz

c_schmitz

2012-05-28 15:44

administrator   ~18966

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

c_schmitz

c_schmitz

2012-05-28 15:44

administrator   ~18967

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

c_schmitz

c_schmitz

2012-05-28 15:45

administrator   ~18968

Thank you!

c_schmitz

c_schmitz

2012-05-28 18:46

administrator   ~18975

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

c_schmitz

c_schmitz

2012-06-07 11:02

administrator   ~19107

New 1.91+ build released.

Related Changesets

LimeSurvey: Yii 79d57b08

2012-05-28 06:44:25

c_schmitz

Details Diff
Fixed issue 06133: Race condition with concurrent upload of similar "survey structure" Affected Issues
06133
mod - application/controllers/admin/surveyadmin.php Diff File

LimeSurvey: master 20871551

2012-05-28 06:44:45

c_schmitz

Details Diff
Fixed issue 06133: Race condition with concurrent upload of similar "survey structure" Affected Issues
06133
mod - admin/http_importsurvey.php Diff File

LimeSurvey: master c7f50372

2012-05-28 09:46:05

c_schmitz

Details Diff
Fixed issue 06133: Race condition with concurrent upload of similar "survey structure" Affected Issues
06133
mod - admin/http_importsurvey.php Diff File

Issue History

Date Modified Username Field Change
2012-05-25 19:11 jmk New Issue
2012-05-26 11:47 jmk Note Added: 18911
2012-05-28 15:44 c_schmitz Changeset attached => LimeSurvey Yii 79d57b08
2012-05-28 15:44 c_schmitz Note Added: 18966
2012-05-28 15:44 c_schmitz Assigned To => c_schmitz
2012-05-28 15:44 c_schmitz Resolution open => fixed
2012-05-28 15:44 c_schmitz Changeset attached => LimeSurvey master 20871551
2012-05-28 15:44 c_schmitz Note Added: 18967
2012-05-28 15:45 c_schmitz Note Added: 18968
2012-05-28 15:45 c_schmitz Status new => resolved
2012-05-28 15:45 c_schmitz Fixed in Version => 1.92+
2012-05-28 18:46 c_schmitz Changeset attached => LimeSurvey master c7f50372
2012-05-28 18:46 c_schmitz Note Added: 18975
2012-06-07 11:02 c_schmitz Note Added: 19107
2012-06-07 11:02 c_schmitz Status resolved => closed