-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
[v20.x] vm: harden module type checks #53109
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anonrig
approved these changes
May 22, 2024
marco-ippolito
approved these changes
May 23, 2024
ed17172
to
f9c85f3
Compare
d702971
to
044bcce
Compare
joyeecheung
reviewed
Jun 17, 2024
lib/internal/vm/module.js
Outdated
this[kDependencySpecifiers] = this[kWrap].getStaticDependencySpecifiers(); | ||
} | ||
validateInternalField(this, kDependencySpecifiers, 'SourceTextModule'); | ||
this[kDependencySpecifiers] ??= ObjectFreeze(this[kWrap].getStaticDependencySpecifiers()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the freezing (from #49720) semver-major?
marco-ippolito
requested changes
Jun 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking on #53109 (comment)
Check if the value returned from user linker function is a null-ish value. `validateInternalField` should be preferred when checking `this` argument to guard against null-ish `this`. Co-authored-by: Mike Ralphson <[email protected]> PR-URL: nodejs#52162 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
f9c85f3
to
5081f84
Compare
a924e20
to
473fa73
Compare
91dea21
to
44268c2
Compare
targos
approved these changes
Sep 21, 2024
@marco-ippolito I believe the comment has been addressed. |
marco-ippolito
approved these changes
Sep 21, 2024
targos
pushed a commit
that referenced
this pull request
Sep 26, 2024
Check if the value returned from user linker function is a null-ish value. `validateInternalField` should be preferred when checking `this` argument to guard against null-ish `this`. Co-authored-by: Mike Ralphson <[email protected]> PR-URL: #52162 Backport-PR-URL: #53109 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Landed in f88bf05 |
targos
pushed a commit
that referenced
this pull request
Oct 2, 2024
Check if the value returned from user linker function is a null-ish value. `validateInternalField` should be preferred when checking `this` argument to guard against null-ish `this`. Co-authored-by: Mike Ralphson <[email protected]> PR-URL: #52162 Backport-PR-URL: #53109 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
targos
pushed a commit
that referenced
this pull request
Oct 2, 2024
Check if the value returned from user linker function is a null-ish value. `validateInternalField` should be preferred when checking `this` argument to guard against null-ish `this`. Co-authored-by: Mike Ralphson <[email protected]> PR-URL: #52162 Backport-PR-URL: #53109 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check if the value returned from user linker function is a null-ish value.
validateInternalField
should be preferred when checkingthis
argument to guard against null-ishthis
.Co-authored-by: Mike Ralphson [email protected]
PR-URL: #52162
Reviewed-By: Vinícius Lourenço Claro Cardoso [email protected]
Reviewed-By: Yagiz Nizipli [email protected]