Giter Club home page Giter Club logo

Comments (5)

paragonie-security avatar paragonie-security commented on August 24, 2024 2

What does that mean??? How can I fix it??? Can anybody shed some light?

It sounds like Limesurvey has a bug in their code that uses sodium_compat rather than a sodium_compat bug.

https://github.com/LimeSurvey/LimeSurvey/blob/1a013ec45e0336650560d078a3038b05c7bb4135/application/core/LSSodium.php#L88-L128

Weirdly, their function claims to be "encryption" but isn't.

We recommend talking to the Limesurvey developers. Paragon Initiative Enterprises does not develop or support Limesurvey.

from sodium_compat.

pathros avatar pathros commented on August 24, 2024

I am using latest version of Limesurvey 5.0.1.

I created a new survey, which I want it to be anonymous but with a list of participants. I have created tokens and sent them to the participants. However, when they click on the invitation link, they get the following error:

Server error 500: Argument 1 must be at least CRYPTO_SIGN_BYTES long.

Taking a look into the source code, right at the "compat.php" file we have (line 2878):

const CRYPTO_SIGN_BYTES = 64;

//....

/* Input validation: */
if (ParagonIE_Sodium_Core_Util::strlen($signedMessage) < self::CRYPTO_SIGN_BYTES)
{
   throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_BYTES long.');
}

In Limesurvey, if I attempt to set a 64 token long, it changes it to 15.
So, I don't get it. What should be longer than 64?

What does that mean??? How can I fix it??? Can anybody shed some light?

I have tried the same thing in Limesurvey version 3 LTS, and everything works flawlessly. However, I want to use the version 5, since it has the ability to encryt the email addresses.

from sodium_compat.

olleharstedt avatar olleharstedt commented on August 24, 2024

Weirdly, their function claims to be "encryption" but isn't.

Hi! I'm a developer for LimeSurvey. Do you have time to elaborate on this comment?

from sodium_compat.

paragonie-security avatar paragonie-security commented on August 24, 2024

I'm not sure what's unclear.

The docblock says:

Encrypt input data using AES256 CBC encryption

The functions name is encrypt()

It uses crypto_sign, which is a digital signature, not encryption.

Read this blog post for a deeper understanding of the concepts: https://paragonie.com/blog/2015/08/you-wouldnt-base64-a-password-cryptography-decoded

from sodium_compat.

olleharstedt avatar olleharstedt commented on August 24, 2024

Thanks

from sodium_compat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.