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: ensure invalid SubtleCrypto JWK data import results in DataError #55041

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

panva
Copy link
Member

@panva panva commented Sep 21, 2024

All invalid data during import is supposed to return DataError DOMException. See https://w3c.github.io/webcrypto/

The WPTs for this are coming in web-platform-tests/wpt#48243 but I'm opening this separately to be able to backport this easily.

@panva panva added crypto Issues and PRs related to the crypto subsystem. request-ci Add this label to start a Jenkins CI on a PR. webcrypto labels Sep 21, 2024
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Sep 21, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024
@nodejs-github-bot
Copy link
Collaborator

@panva panva added lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x web-standards Issues and PRs related to Web APIs labels Sep 21, 2024
@panva
Copy link
Member Author

panva commented Sep 21, 2024

cc @nodejs/web-standards

Copy link

codecov bot commented Sep 21, 2024

Codecov Report

Attention: Patch coverage is 80.76923% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.23%. Comparing base (d5c29ba) to head (4f79636).
Report is 433 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/crypto/aes.js 33.33% 4 Missing ⚠️
lib/internal/crypto/mac.js 33.33% 4 Missing ⚠️
lib/internal/crypto/ec.js 87.50% 1 Missing ⚠️
lib/internal/crypto/rsa.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55041      +/-   ##
==========================================
+ Coverage   88.06%   88.23%   +0.16%     
==========================================
  Files         652      652              
  Lines      183546   183886     +340     
  Branches    35860    35860              
==========================================
+ Hits       161648   162251     +603     
+ Misses      15149    14916     -233     
+ Partials     6749     6719      -30     
Files with missing lines Coverage Δ
lib/internal/crypto/cfrg.js 96.93% <100.00%> (+0.08%) ⬆️
lib/internal/crypto/ec.js 92.78% <87.50%> (+0.13%) ⬆️
lib/internal/crypto/rsa.js 90.44% <87.50%> (+0.16%) ⬆️
lib/internal/crypto/aes.js 90.32% <33.33%> (-1.05%) ⬇️
lib/internal/crypto/mac.js 89.89% <33.33%> (-1.91%) ⬇️

... and 102 files with indirect coverage changes

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 21, 2024
@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 23, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 23, 2024
@nodejs-github-bot nodejs-github-bot merged commit b64006c into nodejs:main Sep 23, 2024
80 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in b64006c

@panva panva deleted the webcrypto-ensure-DataError branch September 23, 2024 15:35
targos pushed a commit that referenced this pull request Oct 4, 2024
PR-URL: #55041
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@aduh95 aduh95 mentioned this pull request Oct 9, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#55041
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
aduh95 pushed a commit that referenced this pull request Nov 2, 2024
PR-URL: #55041
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@aduh95 aduh95 added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed lts-watch-v18.x PRs that may need to be released in v18.x. labels Nov 2, 2024
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. backported-to-v18.x PRs backported to the v18.x-staging branch. crypto Issues and PRs related to the crypto subsystem. lib / src Issues and PRs related to general changes in the lib or src directory. lts-watch-v20.x PRs that may need to be released in v20.x needs-ci PRs that need a full CI run. web-standards Issues and PRs related to Web APIs webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants