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

fix: write handshake nonce correctly #129

Merged

Conversation

achingbrain
Copy link
Collaborator

The value and offset args to Buffer.writeUInt32LE vs DataView.setUint32 are the other way round.

Fixes a bug introduced in #125 where we were using the nonce value as an offset and writing 4 rather than writing the nonce value at offset 4.

The `value` and `offset` args to `Buffer.writeUInt32LE` vs
`DataView.setUint32` are the other way round.

Fixes a bug introduced in ChainSafe#125 where we were using the nonce value
as an offset and writing `4` rather than writing the nonce value
at offset `4`.
@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2022

Codecov Report

Merging #129 (ecd70af) into master (112e247) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #129   +/-   ##
=======================================
  Coverage   88.59%   88.59%           
=======================================
  Files          16       16           
  Lines        1841     1841           
  Branches      248      248           
=======================================
  Hits         1631     1631           
  Misses        210      210           
Impacted Files Coverage Δ
src/handshakes/abstract-handshake.ts 92.07% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 112e247...ecd70af. Read the comment docs.

@mpetrunic
Copy link
Member

I have no idea how you manage to pinpoint this but good job 👏🏻 👏🏻 👏🏻 👏🏻

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ♥️

@wemeetagain wemeetagain merged commit ef64957 into ChainSafe:master Jan 14, 2022
@achingbrain achingbrain deleted the fix/write-handshake-nonce-correctly branch January 14, 2022 15:59
@lidel
Copy link

lidel commented Jan 14, 2022

@wemeetagain mind shipping a patch release with this? It seems we need it to fix CI: https://app.circleci.com/pipelines/github/ipfs/go-ipfs/6010/workflows/3f9c17d0-e388-43f8-8dee-0a7789c5928f/jobs/65407

failed to negotiate security protocol: error reading handshake message: chacha20poly1305: message authentication failed

@mpetrunic
Copy link
Member

@wemeetagain mind shipping a patch release with this? It seems we need it to fix CI: https://app.circleci.com/pipelines/github/ipfs/go-ipfs/6010/workflows/3f9c17d0-e388-43f8-8dee-0a7789c5928f/jobs/65407

failed to negotiate security protocol: error reading handshake message: chacha20poly1305: message authentication failed

Released 5.0.2

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

Successfully merging this pull request may close these issues.

5 participants