- Posts: 14272
- Thank you received: 2581
Ask the community, share ideas, and connect with other LimeSurvey users!
Il faut que tu réouvre le rapport de bogue …
Un vrai cauchemard cette histoire de clé de chiffrement!
/var/www/html/limesurvey/application/core/LSSodium.php(141)129 * Decrypt encrypted string. 130 * @param string $sEncryptedString Encrypted string to decrypt 131 * @param bool $bReturnFalseIfError false by default. If TRUE, return false in case of error (bad decryption). Else, return given $encryptedInput value 132 * @return string Return decrypted value (string or unsezialized object) if suceeded. Return FALSE if an error occurs (bad password/salt given) or inpyt encryptedString 133 * @throws SodiumException 134 */ 135 public function decrypt($sEncryptedString, $bReturnFalseIfError = false): string 136 { 137 if ($this->bLibraryExists === true) { 138 if (!empty($sEncryptedString) && $sEncryptedString !== 'null') { 139 $plaintext = ParagonIE_Sodium_Compat::crypto_secretbox_open(base64_decode($sEncryptedString), $this->sEncryptionNonce, $this->sEncryptionSecretBoxKey); 140 if ($plaintext === false) { 141 throw new SodiumException(sprintf(gT("Wrong decryption key! Decryption key has changed since this data were last saved, so data can't be decrypted. Please consult our manual at %s.", 'unescaped'), 'https://www.limesurvey.org/manual/Data_encryption#Errors')); 142 } else { 143 return $plaintext; 144 } 145 } 146 return ''; 147 } 148 return $sEncryptedString; 149 } 150 151 /** 152 * 153 * Write encryption key to version.php config file
/var/www/html/limesurvey/application/models/LSActiveRecord.php(355): [b]LSSodium[/b]->[b]decrypt[/b]()350 { 351 // if $value is provided, it would decrypt 352 if (!empty($value)) { 353 // load sodium library 354 $sodium = Yii::app()->sodium; 355 return $sodium->decrypt($value); 356 } 357 return ''; 358 } 359 360 /**
/var/www/html/limesurvey/application/core/LimeMailer.php(230): [b]LimeMailer[/b]->[b]__construct[/b]()225 * return \LimeMailer 226 */ 227 public static function getInstance($reset = self::ResetBase) 228 { 229 if ((null === self::$instance) || ($reset == self::ResetComplete)) { 230 self::$instance = new self(); 231 /* no need to reset if new */ 232 return self::$instance; 233 } 234 /* Some part must be always resetted */ 235 if ($reset) {