View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
20264Bug reportsEncryptionpublic2025-10-13 15:42
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version6.6.x 
Summary20264: Bounce processing cannot match encrypted participant email addresses.
Description

When email encryption is enabled for a survey, the system stores participant emails in encrypted form and does not decrypt them during bounce processing. As a result,
bounce messages cannot be automatically linked to participant tokens.

Steps To Reproduce

Steps to Reproduce:

1.Set up IMAP

2 Create a survey with participant email addresses encrypted.

  1. Send emails to participants.

  2. Generate a bounce message.

  3. Observe that the system does not mark the participant as bounced.

Expected Behavior:

Bounce processing should handle encrypted emails, either by temporarily decrypting them securely or by another method, to allow automatic matching.

Actual Behavior:

Bounce messages are not matched to participants when email encryption is enabled.

Impact:

. Automatic bounce handling is not possible for encrypted emails.

. Survey administrators must either disable encryption for these surveys or manually process bounces.

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

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2025-09-16 18:13

manager   ~83417

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

DenisChenu

DenisChenu

2025-09-17 12:20

developer   ~83426

Just save emailstatus ?

gabrieljenik

gabrieljenik

2025-09-23 14:00

manager   ~83457

A comment about the encryption mechanism.

This is what happened here:

  • Record was fetched (attributes were encrypted)
  • A non-expected-encrypted attribute was correctly set
  • Record was attempted to be saved
  • Validation failed for the encrypted attributes: As the data to be validated was encrypted, didn't fit the validation rules which expected non-encrypted data.

I think the whole mechanism is a bit fragile.
It is very for a dev to fall into an error and not encrypt/decrypt properly, or save the whole record (insted of just a few fields).
Also, it is very easy to make data corrupt if double encrypting by accident.

So, I would suggest to add some warning validations to flag these kind of situations:

  • Add Control Flags to know the current encryption/decryption status (probably per attribute)
  • Add a Warning when validating data which is encrypted and shouldn't.
  • Add a Warning when saving without encrypting whereas should be encrypted.
  • Add a Warning when doing EncryptSave and the data is already encrypted.

@DenisChenu @tibor.pacalat

DenisChenu

DenisChenu

2025-09-23 19:29

developer   ~83464

We already have a PR to move whole save and validation to encrypt system, model care of all of this. I don't do it a second time

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

guest

guest

2025-10-13 13:34

viewer   ~83583

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

LimeBot

LimeBot

2025-10-13 15:42

administrator   ~83584

Fixed in Release 6.15.17+251013

Related Changesets

LimeSurvey: master 19656bde

2025-10-13 13:34

Gabriel Jenik

Committer: GitHub


Details Diff
Fixed issue 20264: Bounce processing cannot match encrypted participant email addresses (04440)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
20264
mod - application/controllers/admin/Tokens.php Diff File

Issue History

Date Modified Username Field Change
2025-09-12 15:07 gabrieljenik New Issue
2025-09-12 15:08 gabrieljenik Assigned To => gabrieljenik
2025-09-12 15:08 gabrieljenik Status new => assigned
2025-09-16 18:13 gabrieljenik Assigned To gabrieljenik => DenisChenu
2025-09-16 18:13 gabrieljenik Status assigned => ready for code review
2025-09-16 18:13 gabrieljenik Note Added: 83417
2025-09-16 18:13 gabrieljenik Bug heat 0 => 2
2025-09-17 12:20 DenisChenu Assigned To DenisChenu => gabrieljenik
2025-09-17 12:20 DenisChenu Status ready for code review => in code review
2025-09-17 12:20 DenisChenu Note Added: 83426
2025-09-17 12:20 DenisChenu Bug heat 2 => 4
2025-09-23 14:00 gabrieljenik Note Added: 83457
2025-09-23 19:29 DenisChenu Note Added: 83464
2025-10-13 13:34 Changeset attached => LimeSurvey master 19656bde
2025-10-13 13:34 guest Note Added: 83583
2025-10-13 13:34 guest Bug heat 4 => 6
2025-10-13 13:34 tibor.pacalat Status in code review => resolved
2025-10-13 13:34 tibor.pacalat Resolution open => fixed
2025-10-13 15:42 LimeBot Note Added: 83584
2025-10-13 15:42 LimeBot Status resolved => closed
2025-10-13 15:42 LimeBot Bug heat 6 => 8