Score:0

LimeSurvey: SodiumException: Wrong decryption key

eg flag

Last day in a production Debian GNU/Linux server I've updated LimeSurvey from 5.0.1 to 5.2.5 and I could no longer compile any questionnaire, because when a visitor got to the end, LimeSurvey would crash with this SodiumException:

Wrong decryption key! Decryption key has changed since this data were last saved, so data can't be decrypted. Please consult our manual at https://manual.limesurvey.org/Data_encryption#Errors

It just says that I should take care of my file secret.php but I'm sure that:

  • I have preserved application/config/security.php during the update
  • anyway I have not any encrypted question (I've double-checked every question)
  • anyway I disabled encryption in all participants "extra fields" (even if I have not any extra field and any already existing participant)
  • anyway this is a new survey (so I don't understand why it says there are problems with already existing data do be decrypted)
  • I tried to follow the official documentation but at the time of writing it does not say anything about my use case and it just says that I have lost my keys: https://manual.limesurvey.org/index.php?oldid=162387#Errors

Has this happened to you? What went wrong? What data LimeSurvey is trying to decrypt?

P.S.

eg flag
Please someone add LimeSurvey and libsodium tags, since I'm not allowed to do it. Thank you!
Score:0
eg flag

If the ''wrong decryption key'' error happens only when LimeSurvey sends an email (e.g. when you concluded a survey), try this:

  • go in Configuration > Global Settings > E-mail settings
  • re-insert your STMP password
  • press Save (the button should be on the top of the page)

For some reason LimeSurvey encrypts the SMTP password by default. So, saving it again will force it to be encrypted again correctly.

Some references:


P.S.

I've updated the wiki to add this note, so it should be easy to troubleshoot:


Note: if that doesn't fix it for you, try debugging LimeSurvey:

In this way you should be able to understand what information is encrypted.

Also, consider recovering your application/config/security.php file from a backup, since probably you have lost it at this point if you have not already fixed.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.