Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c59abe

Browse filesBrowse files
aduh95ruyadorno
authored andcommitted
crypto: fix webcrypto.subtle signature
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>
1 parent 9c6b078 commit 9c59abe
Copy full SHA for 9c59abe

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

‎lib/internal/crypto/webcrypto.js‎

Copy file name to clipboardExpand all lines: lib/internal/crypto/webcrypto.js
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const {
55
JSONParse,
66
JSONStringify,
77
ObjectDefineProperties,
8+
ObjectGetOwnPropertyDescriptor,
89
SafeSet,
910
SymbolToStringTag,
1011
StringPrototypeRepeat,
@@ -687,7 +688,11 @@ async function decrypt(algorithm, key, data) {
687688
class SubtleCrypto {}
688689
const subtle = new SubtleCrypto();
689690

690-
class Crypto {}
691+
class Crypto {
692+
get subtle() {
693+
return subtle;
694+
}
695+
}
691696
const crypto = new Crypto();
692697

693698
ObjectDefineProperties(
@@ -699,9 +704,8 @@ ObjectDefineProperties(
699704
value: 'Crypto',
700705
},
701706
subtle: {
707+
...ObjectGetOwnPropertyDescriptor(Crypto.prototype, 'subtle'),
702708
enumerable: true,
703-
configurable: false,
704-
value: subtle,
705709
},
706710
getRandomValues: {
707711
enumerable: true,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.