fix: ensure app load is limited to real asar files when appropriate (#39808)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
This commit is contained in:
trop[bot]
2023-09-11 21:16:56 -07:00
committed by GitHub
parent 8d8751106b
commit 6ecae84da3
4 changed files with 20 additions and 1 deletions

View File

@@ -512,6 +512,13 @@ node::Environment* NodeBindings::CreateEnvironment(
electron::fuses::IsOnlyLoadAppFromAsarEnabled()
? app_asar_search_paths
: search_paths));
context->Global()->SetPrivate(
context,
v8::Private::ForApi(
isolate, gin::ConvertToV8(isolate, "appSearchPathsOnlyLoadASAR")
.As<v8::String>()),
gin::ConvertToV8(isolate,
electron::fuses::IsOnlyLoadAppFromAsarEnabled()));
}
base::FilePath resources_path = GetResourcesPath();