Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsodium 0.7.9+ makes this library unstable #6

Open
tvquizphd opened this issue Sep 19, 2022 · 3 comments
Open

libsodium 0.7.9+ makes this library unstable #6

tvquizphd opened this issue Sep 19, 2022 · 3 comments

Comments

@tvquizphd
Copy link
Contributor

Observed error

When using libsodium 0.7.9 or 0.7.10, the client-side Authentication fails at this line with this message:

client_authenticated_2 false user_id

Curiously, this error only occurs about 9 of every 10 test runs.

Expectation

The tests should pass with minor version updates to libsodium.

The path forward

Clues to the origin of the error may be buried in the libsodium 0.7.9 release logs.

My Workaround

In packages that use opaque, I specify a manual override to pin libsodium to 0.7.8, which works.

  "pnpm": {                                                         
    "overrides": {
      "libsodium-wrappers-sumo": "0.7.8"
    }              
  } 

The tests always pass as expected with libsodium 0.7.8.

@AverageHelper
Copy link
Contributor

I've made a fork and a PR at #7 that may address this issue by pinning the libsodium version to 0.7.6. I haven't dug into the differences in the versions since that one yet, so if we should pin to a later version for some actual enhancement, I probably should do that in my fork.

Any additional eyes on the problem would be very helpful!

@tvquizphd
Copy link
Contributor Author

In PR #8, I've pinned libsodium to 0.7.8. I'm not a maintainer, but I'm interested in your typescript port as well!

@wyatt-howe
Copy link
Member

There is a (mostly unknown) bug in older versions of libsodium.js that relates to point normalization (and possibly other
things). I have meant to find a backwards compatible workaround for a while, but I agree it is best to pin the version in the
meantime. Thanks for tracking down the specific problematic versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants