Closed michidk closed 3 years ago
The weird thing is, that none of the questions in those surveys was set to be encrypted. Also, the responses seem to get successfully submitted after all and can be seen in the admin interface. I can also see the submitted answers without any problems. So I think the encryption key is working, but something else might be going on.
Fixed it. Okay this is super dump and actually had nothing to do with this image: The SMTP server password apparently was wrong. No clue why it would show this specific sodium exception...
I am facing this issue too and re-typing my SMTP password fixed it as well. Weird!
The exception is raised when trying to retrieve the encrypted SMTP password and decrypting it.
From /var/www/html/application/core/LimeMailer.php
:
$emailsmtpuser = Yii::app()->getConfig("emailsmtpuser");
$emailsmtppassword = LSActiveRecord::decryptSingle(Yii::app()->getConfig("emailsmtppassword"));
FWIW here is the stack trace:
{
"success": false,
"message": "¡Llave de encriptación errónea! La llave ha cambiado desde la última vez que se guardaron estos datos, por lo tanto no pueden ser desencriptados. Por favor consulte el manual en https://manual.limesurvey.org/Data_encryption#Errors.",
"error": {
"code": 500,
"type": "SodiumException",
"errorCode": 0,
"message": "¡Llave de encriptación errónea! La llave ha cambiado desde la última vez que se guardaron estos datos, por lo tanto no pueden ser desencriptados. Por favor consulte el manual en https://manual.limesurvey.org/Data_encryption#Errors.",
"file": "/var/www/html/application/core/LSSodium.php",
"line": 120,
"trace": "#0 /var/www/html/application/models/LSActiveRecord.php(353): LSSodium->decrypt()\n#1 /var/www/html/application/core/LimeMailer.php(131): LSActiveRecord::decryptSingle()\n#2 /var/www/html/application/controllers/UserManagementController.php(1312): LimeMailer->__construct()\n#3 /var/www/html/application/controllers/UserManagementController.php(1340): UserManagementController->sendAdminMail()\n#4 /var/www/html/application/controllers/UserManagementController.php(867): UserManagementController->resetLoginData()\n#5 /var/www/html/framework/web/actions/CInlineAction.php(49): UserManagementController->actionBatchSendAndResetLoginData()\n#6 /var/www/html/framework/web/CController.php(308): CInlineAction->runWithParams()\n#7 /var/www/html/framework/web/CController.php(286): CController->runAction()\n#8 /var/www/html/framework/web/CController.php(265): CController->runActionWithFilters()\n#9 /var/www/html/application/controllers/LSBaseController.php(160): CController->run()\n#10 /var/www/html/framework/web/CWebApplication.php(282): LSBaseController->run()\n#11 /var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController()\n#12 /var/www/html/framework/base/CApplication.php(185): CWebApplication->processRequest()\n#13 /var/www/html/index.php(182): CApplication->run()\n#14 {main}",
"traces": [
{
"file": "/var/www/html/application/models/LSActiveRecord.php",
"line": 353,
"function": "decrypt",
"class": "LSSodium",
"type": "->"
},
{
"file": "/var/www/html/application/core/LimeMailer.php",
"line": 131,
"function": "decryptSingle",
"class": "LSActiveRecord",
"type": "::"
},
{
"file": "/var/www/html/application/controllers/UserManagementController.php",
"line": 1312,
"function": "__construct",
"class": "LimeMailer",
"type": "->"
},
{
"file": "/var/www/html/application/controllers/UserManagementController.php",
"line": 1340,
"function": "sendAdminMail",
"class": "UserManagementController",
"type": "->"
},
{
"file": "/var/www/html/application/controllers/UserManagementController.php",
"line": 867,
"function": "resetLoginData",
"class": "UserManagementController",
"type": "->"
},
{
"file": "/var/www/html/framework/web/actions/CInlineAction.php",
"line": 49,
"function": "actionBatchSendAndResetLoginData",
"class": "UserManagementController",
"type": "->"
},
{
"file": "/var/www/html/framework/web/CController.php",
"line": 308,
"function": "runWithParams",
"class": "CInlineAction",
"type": "->"
},
{
"file": "/var/www/html/framework/web/CController.php",
"line": 286,
"function": "runAction",
"class": "CController",
"type": "->"
},
{
"file": "/var/www/html/framework/web/CController.php",
"line": 265,
"function": "runActionWithFilters",
"class": "CController",
"type": "->"
},
{
"file": "/var/www/html/application/controllers/LSBaseController.php",
"line": 160,
"function": "run",
"class": "CController",
"type": "->"
},
{
"file": "/var/www/html/framework/web/CWebApplication.php",
"line": 282,
"function": "run",
"class": "LSBaseController",
"type": "->"
},
{
"file": "/var/www/html/framework/web/CWebApplication.php",
"line": 141,
"function": "runController",
"class": "CWebApplication",
"type": "->"
},
{
"file": "/var/www/html/framework/base/CApplication.php",
"line": 185,
"function": "processRequest",
"class": "CWebApplication",
"type": "->"
},
{
"file": "/var/www/html/index.php",
"line": 182,
"function": "run",
"class": "CApplication",
"type": "->"
}
]
}
}```
Hi,
two weeks ago I set up LimeSurvey twice and both times got the "wrong decryption key" error (listed here: https://manual.limesurvey.org/Data_encryption#Errors), after trying to submit a survey. Today I set it up a third time, and the error occurred again. It seems like after restarting the container once, this error will appear on every survey:
I mounted the following folders to our file system (which I hoped would store the encryption key):
I mounted the config folder which contains the security.php (file owned by www-data:www-data and 777) file containing the encryption key, but it seems like it's not used? I also got into the container with interactive mode and made sure that the file is mounted correctly. And yeah, the file was mounted and is located in
/var/www/html/application/config/security.php
Using the latest image
martialblog/limesurvey:4-apache
with a Postgres database.Are we sure that Sodium is installed, which is needed for LimeSurvey decryption to work? EDIT: Sodium seems to be installed according to PHPInfo: libsodium headers version | 1.0.17 libsodium library version | 1.0.17
Is there anything we can do?
Thanks!
EDIT 2: Just tried to pass the encryption key that was in the security.php as environment variables to the image, but this did not work, too.
Log (of starting up and submitting a survey; debug level 2):