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

crypto: fix error when getRandomValues is called without arguments #45854

Closed
wants to merge 1 commit into from

Conversation

panva
Copy link
Member

@panva panva commented Dec 14, 2022

Fixes globalThis.crypto.getRandomValues arguments length validation.

Was

DOMException [TypeMismatchError]: The data argument must be an integer-type TypedArray

Now

Uncaught TypeError [ERR_MISSING_ARGS]: The "typedArray" argument must be specified
  code: 'ERR_MISSING_ARGS'

@panva panva added crypto Issues and PRs related to the crypto subsystem. webcrypto labels Dec 14, 2022
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 14, 2022
@panva panva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 14, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 14, 2022
@nodejs-github-bot

This comment was marked as outdated.

@panva panva added dont-land-on-v16.x dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. and removed dont-land-on-v16.x dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. labels Dec 14, 2022
@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 14, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@panva panva removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 16, 2022
@panva
Copy link
Member Author

panva commented Dec 16, 2022

Landed in 3014c5d

@panva panva closed this Dec 16, 2022
panva added a commit that referenced this pull request Dec 16, 2022
PR-URL: #45854
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@panva panva deleted the fix-getrandomvalues-empty-args branch December 16, 2022 13:12
@aduh95
Copy link
Contributor

aduh95 commented Dec 16, 2022

This landed despite the latest Jenkins CI being red (and this change does affect the node binary).

Do not land any pull requests without the necessary passing CI runs.
A passing (green) GitHub Actions CI result is required. A passing (green or
yellow) [Jenkins CI](https://ci.nodejs.org/) is also required if the pull
request contains changes that will affect the `node` binary. This is because
GitHub Actions CI does not cover all the environments supported by Node.js.

targos pushed a commit that referenced this pull request Jan 1, 2023
PR-URL: #45854
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Jan 2, 2023
@panva panva added dont-land-on-v14.x dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. labels Jan 24, 2023
juanarbol pushed a commit that referenced this pull request Jan 26, 2023
PR-URL: #45854
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@juanarbol juanarbol mentioned this pull request Jan 28, 2023
Sign up for free to join this conversation on GitHub. 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. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. needs-ci PRs that need a full CI run. webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants