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

This commit is contained in:
Samuel Attard
2023-09-11 11:51:14 -07:00
committed by GitHub
parent ac040bf734
commit 16aec702b4
4 changed files with 20 additions and 1 deletions

View File

@@ -586,6 +586,13 @@ std::shared_ptr<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();