View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
16572Bug reportsSurvey takingpublic2023-11-03 11:26
Reportergabrieljenik Assigned Top_teichmann  
PriorityhighSeveritypartial_block 
Status ready for code reviewResolutionopen 
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 heat8
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

administrator   ~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.

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