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 webcrypto.subtle signature #41761

Merged
merged 3 commits into from
Jan 31, 2022

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jan 29, 2022

Object.getOwnPropertyDescriptor((crypto.webcrypto || crypto).constructor.prototype, 'subtle').get.name
  • Chromium: "get subtle"
  • Firefox: "get subtle"
  • Safari: "get subtle"
  • Deno: "get subtle"
  • Node.js TypeError: Cannot read properties of undefined (reading 'name')

This PR aligns Node.js with the rest of the ecosystem.

@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 Jan 29, 2022
@aduh95 aduh95 changed the title crypto: fix webcrpto.subtle signature crypto: fix webcrypto.subtle signature Jan 29, 2022
@panva panva added the experimental Issues and PRs related to experimental features. label Jan 30, 2022
@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. labels Jan 30, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2022
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@tniessen
Copy link
Member

Is this actually required by the spec or WPT?

@targos
Copy link
Member

targos commented Jan 31, 2022

It's always difficult to find things in Web IDL, but I think this is the relevant part: https://webidl.spec.whatwg.org/#dfn-attribute-getter

Let name be the string "get " prepended to attribute’s identifier.

subtle is defined as a readonly attribute: https://w3c.github.io/webcrypto/#crypto-interface

@tniessen
Copy link
Member

Thanks @targos.

@aduh95
Copy link
Contributor Author

aduh95 commented Jan 31, 2022

To whoever lands this: there's a typo in the commit message webcrpto->webcrypto.

@aduh95 aduh95 merged commit 7123a00 into nodejs:master Jan 31, 2022
@aduh95
Copy link
Contributor Author

aduh95 commented Jan 31, 2022

Landed in 7123a00

@aduh95 aduh95 deleted the webcrypto-get-subtle branch January 31, 2022 22:23
ruyadorno pushed a commit that referenced this pull request Feb 8, 2022
PR-URL: #41761
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Mar 2, 2022
PR-URL: #41761
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Mar 3, 2022
PR-URL: #41761
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Mar 14, 2022
PR-URL: #41761
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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. experimental Issues and PRs related to experimental features. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants