Skip to content

Commit

Permalink
Fixed issue #17353: Argument 1 must be at least CRYPTO_SIGN_BYTES long
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 5, 2021
1 parent f4b0be1 commit 350b5c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -3948,7 +3948,9 @@ public function setVariableAndTokenMappingsForExpressionManager($surveyid, $forc
foreach ($token as $key => $val) {
// Decrypt encrypted token attributes
if (isset($tokenEncryptionOptions['columns'][$key]) && $tokenEncryptionOptions['columns'][$key] === 'Y') {
$val = $token->decrypt($val);
if (!empty($val)) {

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jun 7, 2021

Collaborator
  1. What for "0" ? It's not encrypted
  2. Why not fix the real issue here :
    if (!empty($sEncryptedString) && $sEncryptedString != 'null') {
    because seems there are an issue : it must not work for "".

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jun 7, 2021

Collaborator

Lack of return $sEncryptedString here :

?

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Jun 7, 2021

Author Collaborator

We will review LSSodium internally today.

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Jun 7, 2021

Author Collaborator

What for "0" ? It's not encrypted

If participant name is "0" and encrypted, it fails?

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jun 7, 2021

Collaborator

I don't know :)

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Jun 7, 2021

Author Collaborator

I must test...

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Jun 7, 2021

Author Collaborator

Not possible to save first name as 0. So sad.

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jun 7, 2021

Collaborator

Another issue then
Capture d’écran_2021-06-07_13-06-38

In 3.X : we can

$val = $token->decrypt($val);
}
}
$this->knownVars["TOKEN:" . strtoupper($key)] = [
'code' => $anonymized ? '' : $val,
Expand Down

0 comments on commit 350b5c2

Please sign in to comment.