View Issue Details

This issue affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
16572Bug reportsSurvey takingpublic2026-09-28 17:25
Reportergabrieljenik Assigned ToDenisChenu  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.3.9 
Summary16572: LSActiveRecord::encryptSave() doesn't run validations by default, while the standard 'save' method does
Description

As validation on EncryptSave is not by default, some validations need to be explicitly requested. On 16538 validation was missing. Could this happen on others?

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

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2021-10-07 13:43

reporter   ~66792

How to continue with this one?

gabrieljenik

gabrieljenik

2021-10-07 15:58

manager   ~66800

I would set validation = TRUE by default and review the places where encryptsave is used to review if validation should be turned off.
Also, validation, at least for encryptsave, should maybe not be applied to encripted fields?

DenisChenu

DenisChenu

2022-03-08 15:38

developer   ~68592

I didn't see it was reported : https://github.com/LimeSurvey/LimeSurvey/pull/2149

new function : public function encryptSave($runValidation = true, $attributes = null)

Else : i give my opinion previously. In my opinion : all model->attribute must be decrypted transparently (and save as crypted transparently too).

It need a lot more developement here, and surely broke some plugin :)

p_teichmann

p_teichmann

2023-11-01 15:37

administrator   ~78200

@DenisChenu PR looks good to me, could you merge the target branch in to check if theres any issues.

DenisChenu

DenisChenu

2026-04-01 15:26

developer   ~84569

3 years after ....

https://github.com/LimeSurvey/LimeSurvey/pull/3596#issuecomment-4170053358

DenisChenu

DenisChenu

2026-04-20 12:37

developer   ~84695

There are still issues where validations are not used.
It's done, and not used

DenisChenu

DenisChenu

2026-09-25 17:53

developer   ~86006

When a mandatory question is left unanswered and user clicks next, I see answers in responses view encrypted.

I can't reproduce

DenisChenu

DenisChenu

2026-09-25 18:16

developer   ~86007

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

LimeBot

LimeBot

2026-09-28 17:25

administrator   ~86071

Fixed in Release 7.4.0+260928

Related Changesets

LimeSurvey: master d9a29c08

2026-09-25 18:16

DenisChenu

Committer: GitHub


Details Diff
Fixed issue 16572: LSActiveRecord::encryptSave() doesn't run validations by default, while the standard 'save' method does (03596) Affected Issues
16572
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/frontend_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - application/models/LSActiveRecord.php Diff File
mod - application/models/Participant.php Diff File
mod - application/models/ParticipantAttribute.php Diff File
mod - application/models/SurveyDynamic.php Diff File

Issue History

Date Modified Username Field Change
2020-08-07 15:06 gabrieljenik New Issue
2020-08-07 15:06 gabrieljenik Status new => assigned
2020-08-07 15:06 gabrieljenik Assigned To => ollehar
2021-03-10 21:03 ollehar Priority none => high
2021-03-10 21:04 ollehar Status assigned => new
2021-10-07 13:43 ollehar Note Added: 66792
2021-10-07 13:43 ollehar Bug heat 0 => 2
2021-10-07 13:45 ollehar Status new => acknowledged
2021-10-07 15:58 gabrieljenik Note Added: 66800
2021-10-07 15:58 gabrieljenik Bug heat 2 => 4
2022-03-08 15:35 DenisChenu Assigned To ollehar => DenisChenu
2022-03-08 15:38 DenisChenu Note Added: 68592
2022-03-08 15:38 DenisChenu Bug heat 4 => 6
2022-04-06 15:52 DenisChenu Status acknowledged => ready for code review
2022-04-06 15:52 DenisChenu Assigned To DenisChenu => p_teichmann
2023-11-01 11:14 p_teichmann Status ready for code review => in code review
2023-11-01 15:37 p_teichmann Note Added: 78200
2023-11-01 15:37 p_teichmann Bug heat 6 => 8
2023-11-02 08:32 DenisChenu Assigned To p_teichmann => DenisChenu
2023-11-03 11:26 DenisChenu Assigned To DenisChenu => p_teichmann
2023-11-03 11:26 DenisChenu Status in code review => ready for code review
2026-04-01 15:26 DenisChenu Assigned To p_teichmann => DenisChenu
2026-04-01 15:26 DenisChenu Status ready for code review => in code review
2026-04-01 15:26 DenisChenu Note Added: 84569
2026-04-20 12:30 DenisChenu Assigned To DenisChenu => c_schmitz
2026-04-20 12:30 DenisChenu Status in code review => ready for code review
2026-04-20 12:37 DenisChenu Note Added: 84695
2026-09-25 17:52 DenisChenu Assigned To c_schmitz => tibor.pacalat
2026-09-25 17:52 DenisChenu Status ready for code review => in testing
2026-09-25 17:53 DenisChenu Note Added: 86006
2026-09-25 17:53 DenisChenu File Added: Capture vidéo du 2026-09-25 17-51-01.mp4
2026-09-25 18:16 DenisChenu Changeset attached => LimeSurvey master d9a29c08
2026-09-25 18:16 DenisChenu Note Added: 86007
2026-09-25 18:16 DenisChenu Assigned To tibor.pacalat => DenisChenu
2026-09-25 18:16 DenisChenu Status in testing => resolved
2026-09-25 18:16 DenisChenu Resolution open => fixed
2026-09-28 17:25 LimeBot Note Added: 86071
2026-09-28 17:25 LimeBot Status resolved => closed
2026-09-28 17:25 LimeBot Bug heat 8 => 10