View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
19181Bug reportsStatisticspublic2023-10-30 14:00
ReporterQcFe_PoliTo Assigned Tomfavetti  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version6.2.x 
Summary19181: Array[Number] statistics infinite loop when step is set to 0
Description

Explicitly setting 0 to the step value for an Array[Number] question type will make the statistics page break, getting stuck on an infinite loop.

There is no validation on array number fields on frontend, if user inputs nonsense values they don't get validated and in the case above, the statistics page break.

Steps To Reproduce

Steps to reproduce

  • Create a new survey with a question of type Array[Number], then set step size to 0.
  • Open the survey
  • Open statistics for the survey -> white page with logged error of trying to allocate too much memory
    Affected file/line:
    application/views/admin/export/statistics_subviews/_question.php:649

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)6.3.0+231016
I will donate to the project if issue is resolvedNo
BrowserAny
Database type & versionmariadb Ver 15.1 Distrib 10.5.16-MariaDB
Server OS (if known)Rocky linux 9.2
Webserver software & version (if known)Apache/2.4.53
PHP Version8.0.30 - Zend Engine v4.0.30

Relationships

related to 18848 closedp_teichmann setting specific values for steps in Array(numbers) causes infinite loops 

Users monitoring this issue

QcFe_PoliTo, mfavetti

Activities

mfavetti

mfavetti

2023-10-22 21:25

developer   ~77837

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

NOTE: I ported p_teichmann's commit for 18848 to master to fix this issue

mfavetti

mfavetti

2023-10-24 17:54

developer   ~77939

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

LimeBot

LimeBot

2023-10-30 14:00

administrator   ~78136

Fixed in Release 6.3.2+231031

Related Changesets

LimeSurvey: master 39aab86b

2023-10-24 17:50:22

mfavetti


Committer: GitHub Details Diff
Fixed issue 19181: Array[Number] statistics infinite loop when step is set to 0 (#3563)

Co-authored-by: Patrick Teichmann <patrick.teichmann@limesurvey.org>
Affected Issues
19181
mod - application/controllers/admin/DataEntry.php Diff File
mod - application/helpers/admin/statistics_helper.php Diff File
mod - application/helpers/export_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
mod - application/helpers/userstatistics_helper.php Diff File
mod - application/views/admin/export/statistics_subviews/_question.php Diff File
mod - application/views/survey/questions/answer/arrays/multiflexi/config.xml Diff File

Issue History

Date Modified Username Field Change
2023-10-19 16:55 QcFe_PoliTo New Issue
2023-10-19 16:56 QcFe_PoliTo Issue Monitored: QcFe_PoliTo
2023-10-19 16:56 QcFe_PoliTo Bug heat 0 => 2
2023-10-22 03:05 mfavetti Assigned To => mfavetti
2023-10-22 03:05 mfavetti Status new => assigned
2023-10-22 04:15 mfavetti Relationship added related to 18848
2023-10-22 21:25 mfavetti Note Added: 77837
2023-10-22 21:25 mfavetti Bug heat 2 => 4
2023-10-22 21:28 mfavetti Assigned To mfavetti => DenisChenu
2023-10-22 21:28 mfavetti Status assigned => ready for code review
2023-10-23 11:38 DenisChenu Assigned To DenisChenu => tibor.pacalat
2023-10-23 11:38 DenisChenu Status ready for code review => ready for testing
2023-10-23 20:49 mfavetti Issue Monitored: mfavetti
2023-10-23 20:49 mfavetti Bug heat 4 => 6
2023-10-24 17:50 tibor.pacalat Status ready for testing => resolved
2023-10-24 17:50 tibor.pacalat Resolution open => fixed
2023-10-24 17:54 mfavetti Changeset attached => LimeSurvey master 39aab86b
2023-10-24 17:54 mfavetti Note Added: 77939
2023-10-24 17:54 mfavetti Assigned To tibor.pacalat => mfavetti
2023-10-30 14:00 LimeBot Note Added: 78136
2023-10-30 14:00 LimeBot Status resolved => closed
2023-10-30 14:00 LimeBot Bug heat 6 => 8