8000 crypto: diffieHellman throw error on invalid object by Lxxyx · Pull Request #37016 · nodejs/node · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Lxxyx
Copy link
Member
@Lxxyx Lxxyx commented Jan 21, 2021
const crypto = require('crypto')
crypto.diffieHellman(null)

Before:

node:internal/crypto/diffiehellman:297
  const { privateKey, publicKey } = options;
          ^

TypeError: Cannot destructure property 'privateKey' of 'options' as it is null.
    at Object.diffieHellman (node:internal/crypto/diffiehellman:297:11)

After:

TypeError [ERR_INVALID_ARG_TYPE]: The "options" argument must be of type object. Received null
      at Object.diffieHellman (node:internal/crypto/diffiehellman:293:3)

@nodejs-github-bot nodejs-github-bot added the crypto Issues and PRs related to the crypto subsystem. label Jan 21, 2021
@Lxxyx Lxxyx force-pushed the crypto-diffieHellman-throw-error-on-null branch from feb1519 to 3743807 Compare January 21, 2021 12:22
@RaisinTen RaisinTen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 21, 2021
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Trott
Trott approved these changes Jan 23, 2021 8000
Trott pushed a commit that referenced this pull request Jan 23, 2021
PR-URL: #37016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott
Copy link
Member
Trott commented Jan 23, 2021

Landed in dbdc14b

@Trott Trott closed this Jan 23, 2021
@Lxxyx Lxxyx deleted the crypto-diffieHellman-throw-error-on-null branch January 23, 2021 12:24
targos pushed a commit that referenced this pull request Feb 2, 2021
PR-URL: #37016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@targos targos mentioned this pull request Feb 2, 2021
Sign up for free to join this conversation on GitHub 91EE . Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. crypto Issues and PRs related to the crypto subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

0