[pull] main from nodejs:main - #1146
Merged
Merged
Conversation
The THROW_IF_INSUFFICIENT_PERMISSIONS and ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS macros called ThrowAccessDenied/AsyncThrowAccessDenied unconditionally and only guarded the `return` with `warning_only()`. ERR_ACCESS_DENIED_IF_INSUFFICIENT_PERMISSIONS had no `warning_only()` guard at all — it always set the access-denied error and returned. As a result, running with `--permission-audit` still produced ERR_ACCESS_DENIED on any denied operation (fs, net, child_process, worker, addon, ffi, inspector, wasi), defeating the audit-only purpose of the flag. Guard the denied-error path behind `!warning_only()` in all three macros. In audit mode, the diagnostics-channel message is published (already done in Permission::is_scope_granted) and execution continues; in enforce mode (`--permission`), behavior is unchanged — the error is raised and the call returns. The tests cover both the direct (top-level) call and an `eval()`-wrapped call: the direct call exercises the normal script path, and the `eval()`-wrapped call exercises the V8 script-context boundary (the diagnostics subscriber is registered in the outer module context while the denied operation runs inside an eval'd string). Refs: 9ddd1a9 Signed-off-by: Adrian Estrada <edsadr@gmail.com> PR-URL: #64426 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Treat an unfinished Zstd frame as an unexpected end of file when the stream is finalized with ZSTD_e_end. Avoid reporting an error while the output buffer still needs to be drained or when an empty final write follows a completed frame. Preserve partial decompression when ZSTD_e_flush is used. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com> PR-URL: #64593 Fixes: #64592 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
The SEA configuration defines the output binary as `sea`, but the signing and run steps still referenced `hello`. Update the example to use `sea` consistently so the commands match the generated binary. Signed-off-by: Maxence Robinet <107369283+saint-james-fr@users.noreply.github.com> PR-URL: #64025 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
MemoryProvider recursive readdir walked the directory tree with a recursive helper. Rewrite it to traverse iteratively with an explicit stack so a deeply nested tree can no longer exhaust the call stack. The set of directories on the active traversal path is still tracked, so a circular symlink stops descending while its entry remains listed; the output and observable behavior are unchanged. Refs: #64168 Signed-off-by: AkshatOP <hunterdevil0987@gmail.com> PR-URL: #64149 Fixes: #64148 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: #64589 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Steven <steven@ceriously.com> PR-URL: #63420 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
The import.meta example for new vm.SourceTextModule() in vm.md does not
run as written. It fails in two separate ways.
First, the constructor is missing the context: contextifiedObject
option, so the module evaluates in the top context where secret is not
defined, and the snippet throws ReferenceError: secret is not defined.
Second, the trailing note suggests replacing meta.prop = {} with
vm.runInContext('{}', contextifiedObject), but '{}' is parsed as an
empty block and evaluates to undefined. That makes the following
Object.getPrototypeOf(import.meta.prop) throw TypeError. Wrapping it as
'({})' returns an object, which is what the note intends.
This adds the context option and corrects the suggested replacement to
'({})' in both the mjs and cjs variants.
Fixes: #64076
Signed-off-by: Muhammad Zeeshan <61280174+zeeshan56656@users.noreply.github.com>
PR-URL: #64112
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )