View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
19484Bug reportsResponse browsingpublic2024-04-02 14:01
Reportertibor.pacalat Assigned Totibor.pacalat  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version6.4.x 
Summary19484: File upload question - max_num_of_files problem
Description

You can set the max_num_of_files question attribute to an unlimited number.
If someone sets this to 9999999 for example (a customer did this), the responses page will die.

This is because in application/controllers/ResponsesController.php:213 and application/models/SurveyDynamic.php:408 a for loop with the max_num_of_files number is run.

So either the code in this places should do things only for the actual uploaded files, or we restrict
the max_num_of_files setting to a max value of 25. (Carsten says 25 is a good max)

Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)6.4.12+240311
I will donate to the project if issue is resolvedNo
Browser
Database type & version.
Server OS (if known)
Webserver software & version (if known)
PHP Version.

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2024-03-19 22:30

manager   ~79810

https://github.com/LimeSurvey/LimeSurvey/pull/3794

DenisChenu

DenisChenu

2024-03-20 08:24

developer   ~79811

@tibor.pacalat : what page die ?

What for preview question ? (since we shown 9999999 dropdown)

About 25 (if we need it) : 100 is better and have a option to set it in config.php (or DB why not)

DenisChenu

DenisChenu

2024-03-20 16:09

developer   ~79813

Carsten approve PR

DenisChenu

DenisChenu

2024-03-26 08:48

developer   ~79829

Both controller seems fixed.

What for public survey ? It work ?

guest

guest

2024-03-26 13:24

viewer   ~79832

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

tibor.pacalat

tibor.pacalat

2024-03-26 13:25

administrator   ~79833

Tested and merged.

LimeBot

LimeBot

2024-04-02 14:01

administrator   ~79856

Fixed in Release 6.5.2+240402

Related Changesets

LimeSurvey: master c16d1df5

2024-03-26 13:24:34

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 19484: File upload question - max_num_of_files problem (#3794)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
19484
mod - application/controllers/ResponsesController.php Diff File
mod - application/models/SurveyDynamic.php Diff File

Issue History

Date Modified Username Field Change
2024-03-15 15:00 tibor.pacalat New Issue
2024-03-15 15:01 tibor.pacalat Assigned To => gabrieljenik
2024-03-15 15:01 tibor.pacalat Status new => assigned
2024-03-19 22:30 gabrieljenik Assigned To gabrieljenik => DenisChenu
2024-03-19 22:30 gabrieljenik Status assigned => ready for code review
2024-03-19 22:30 gabrieljenik Note Added: 79810
2024-03-19 22:30 gabrieljenik Bug heat 0 => 2
2024-03-20 08:24 DenisChenu Note Added: 79811
2024-03-20 08:24 DenisChenu Bug heat 2 => 4
2024-03-20 16:09 DenisChenu Status ready for code review => in code review
2024-03-20 16:09 DenisChenu Note Added: 79813
2024-03-26 08:48 DenisChenu Assigned To DenisChenu => tibor.pacalat
2024-03-26 08:48 DenisChenu Status in code review => ready for testing
2024-03-26 08:48 DenisChenu Note Added: 79829
2024-03-26 13:24 Changeset attached => LimeSurvey master c16d1df5
2024-03-26 13:24 guest Note Added: 79832
2024-03-26 13:24 guest Bug heat 4 => 6
2024-03-26 13:25 tibor.pacalat Status ready for testing => resolved
2024-03-26 13:25 tibor.pacalat Resolution open => fixed
2024-03-26 13:25 tibor.pacalat Note Added: 79833
2024-03-26 13:25 tibor.pacalat Bug heat 6 => 8
2024-04-02 14:01 LimeBot Note Added: 79856
2024-04-02 14:01 LimeBot Status resolved => closed
2024-04-02 14:01 LimeBot Bug heat 8 => 10