Skip to content

crypto: forbid passing Float16Array to getRandomValues() #57880

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

Conversation

LiviaMedeiros
Copy link
Member

Depends on: #57879

@LiviaMedeiros LiviaMedeiros added the blocked PRs that are blocked by other issues or PRs. label Apr 14, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Apr 14, 2025
@anonrig
Copy link
Member

anonrig commented Apr 15, 2025

Can you add a test?

@LiviaMedeiros
Copy link
Member Author

I believe this is already covered by wpt (although the relevant test is temporarily disabled exactly because of no Float16Array support), but if you think it needs to be tested here as well, I can add it.

@aduh95 aduh95 added dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v23.x PRs that should not land on the v23.x-staging branch and should not be released in v23.x. and removed dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v23.x PRs that should not land on the v23.x-staging branch and should not be released in v23.x. labels Apr 15, 2025
@aduh95
Copy link
Contributor

aduh95 commented Apr 15, 2025

Adding the dont-land label as I think there's no point to have this check on release lines that do not have Float16Array support

@aduh95
Copy link
Contributor

aduh95 commented Apr 15, 2025

I believe this is already covered by wpt (although the relevant test is temporarily disabled exactly because of no Float16Array support), but if you think it needs to be tested here as well, I can add it.

It would probably make sense to enable the test in this PR, passing the V8 flag to expose Float16Array to WPT tests

@aduh95 aduh95 marked this pull request as ready for review April 16, 2025 22:48
@aduh95 aduh95 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. and removed blocked PRs that are blocked by other issues or PRs. labels Apr 16, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 16, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (b2405e9) to head (d5fe39e).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57880      +/-   ##
==========================================
- Coverage   90.23%   90.23%   -0.01%     
==========================================
  Files         630      630              
  Lines      185688   185788     +100     
  Branches    36405    36416      +11     
==========================================
+ Hits       167559   167648      +89     
- Misses      11000    11007       +7     
- Partials     7129     7133       +4     
Files with missing lines Coverage Δ
lib/internal/crypto/random.js 96.09% <100.00%> (+0.01%) ⬆️

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Apr 17, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 17, 2025
@nodejs-github-bot nodejs-github-bot merged commit c11c7be into nodejs:main Apr 17, 2025
85 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in c11c7be

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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. 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. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants