View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20902Bug reportsCentral participant databasepublic2026-11-28 14:35
ReporterDenisChenu Assigned Totibor.pacalat  
PrioritynoneSeverityminor 
Status confirmedResolutionopen 
Product Version7.11.x 
Summary20902: CPDB: overwriting attributes of an existing central participant from a survey copies the raw value, encryption settings are igno
Description

When survey participants are added to the central participant database (CPDB) and a matching central participant already exists, the "overwrite" options copy the attribute values with Participant::updateAttributeValueToken().

This function copies the raw value of the survey participant column to participant_attribute: the value is not decrypted with the survey settings, and not encrypted with the settings of the destination CPDB attribute.

  • Survey attribute encrypted, CPDB attribute not encrypted: the CPDB attribute contains the encrypted string instead of the plain value.
  • Survey attribute not encrypted, CPDB attribute encrypted: the plain value is stored where an encrypted value is expected (stored in clear, and it can not be decrypted when it is read).
Steps To Reproduce

Steps to reproduce

  1. Create a CPDB attribute "Department", not encrypted.
  2. Create a survey with a survey participant table and a participant attribute (attribute_1), encrypted.
  3. Add a survey participant with a value in attribute_1, and share it with the CPDB (the central participant is created).
  4. Change the value of attribute_1 for this survey participant.
  5. Add the survey participant to the CPDB again: map attribute_1 to "Department", check the option to overwrite the existing values.
  6. Look at "Department" for this central participant.

Expected result

"Department" contains the new plain value.

Actual result

"Department" contains the encrypted string of the survey attribute.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)7.11.0
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant
Git branch / Pull Request URLN/A

Relationships

related to 20906 newtibor.pacalat Survey participant attribute encryption setting is not respected when sharing CPDB participants 
related to 20903 confirmedtibor.pacalat CPDB: attributes are not overwritten when the existing central participant is found by name and email 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2026-11-26 16:34

developer   ~87974

Possible fix, like the CSV import of the CPDB (ParticipantsAction::actionImportCSV): read the survey participant with TokenDynamic and decrypt() it, then write the value with new ParticipantAttribute() + encrypt() + ParticipantAttribute::updateParticipantAttributeValue(). encrypt() applies the "encrypted" setting of the CPDB attribute and CPDB_encryption_method.

tibor.pacalat

tibor.pacalat

2026-11-26 17:04

administrator   ~87978

Hmm, I am not sure if this is supposed to work like that. I did the same scenario, but I have set the attribute as encrypted in the CPDB and this worked.
I think you either need to have the attribute plain or encrypted on both sides.

DenisChenu

DenisChenu

2026-11-28 12:09

developer   ~87989

Oups, not exacly the same here : it's when copy ...

DenisChenu

DenisChenu

2026-11-28 12:28

developer   ~87994

https://streamable.com/8px0x6

DenisChenu

DenisChenu

2026-11-28 12:29

developer   ~87995

Both are in https://drop.chapril.org/download/c4ff5ca12dfd32f8/#TYrqxEwjH-zisfWiJX8iug

DenisChenu

DenisChenu

2026-11-28 14:23

developer   ~87996

Ligther

DenisChenu

DenisChenu

2026-11-28 14:23

developer   ~87997

CPDB: overwriting attributes of an existing central participant from a survey copies the raw value, encryption settings are ignored

Good title

Issue History

Date Modified Username Field Change
2026-11-26 16:29 DenisChenu New Issue
2026-11-26 16:34 DenisChenu Note Added: 87974
2026-11-26 16:34 DenisChenu Bug heat 0 => 2
2026-11-26 17:04 tibor.pacalat Note Added: 87978
2026-11-26 17:04 tibor.pacalat Bug heat 2 => 4
2026-11-26 17:05 tibor.pacalat Assigned To => DenisChenu
2026-11-26 17:05 tibor.pacalat Status new => feedback
2026-11-28 12:06 DenisChenu Assigned To DenisChenu => tibor.pacalat
2026-11-28 12:06 DenisChenu Status feedback => confirmed
2026-11-28 12:09 DenisChenu Note Added: 87989
2026-11-28 12:19 DenisChenu Assigned To tibor.pacalat => DenisChenu
2026-11-28 12:19 DenisChenu Status confirmed => feedback
2026-11-28 12:28 DenisChenu Note Added: 87994
2026-11-28 12:29 DenisChenu Note Added: 87995
2026-11-28 14:23 DenisChenu Note Added: 87996
2026-11-28 14:23 DenisChenu File Added: Capture-CPDB-NotEncryptedGetEncryptedValue2.webm
2026-11-28 14:23 DenisChenu Assigned To DenisChenu => tibor.pacalat
2026-11-28 14:23 DenisChenu Status feedback => confirmed
2026-11-28 14:23 DenisChenu Note Added: 87997
2026-11-28 14:32 DenisChenu Relationship added related to 20906
2026-11-28 14:35 DenisChenu Relationship added related to 20903