From df99adf2b56b8bf067bc0011a43120a0f41fd19f Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 21 Sep 2021 10:12:53 -0400 Subject: [PATCH] Revert "GP-1300: Prevent illegal access to java.net module." It broke tests and the workaround isn't known yet. This reverts commit d590f10238f58c557abb09f44a05391ea0d8438d. --- Ghidra/Features/Base/.launch/Ghidra.launch | 3 +-- .../main/java/ghidra/app/plugin/core/osgi/BundleHost.java | 6 +----- Ghidra/RuntimeScripts/Common/support/launch.properties | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Ghidra/Features/Base/.launch/Ghidra.launch b/Ghidra/Features/Base/.launch/Ghidra.launch index 08b3e245f3..c619ef5bd6 100644 --- a/Ghidra/Features/Base/.launch/Ghidra.launch +++ b/Ghidra/Features/Base/.launch/Ghidra.launch @@ -18,7 +18,6 @@ - @@ -31,5 +30,5 @@ - + diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java index 09fae3f929..a448d5ca7e 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java @@ -39,8 +39,7 @@ import ghidra.framework.Application; import ghidra.framework.options.SaveState; import ghidra.framework.plugintool.PluginTool; import ghidra.util.Msg; -import ghidra.util.task.TaskLauncher; -import ghidra.util.task.TaskMonitor; +import ghidra.util.task.*; /** * Hosts the embedded OSGi framework and manages {@link GhidraBundle}s. @@ -419,9 +418,6 @@ public class BundleHost { // setup the cache path config.setProperty(Constants.FRAMEWORK_STORAGE, makeCacheDir()); - - // disable felix url handlers service (performs illegal access to java.net module) - config.setProperty(FelixConstants.SERVICE_URLHANDLERS_PROP, "false"); config.put(FelixConstants.LOG_LEVEL_PROP, "1"); if (STDERR_DEBUGGING) { diff --git a/Ghidra/RuntimeScripts/Common/support/launch.properties b/Ghidra/RuntimeScripts/Common/support/launch.properties index 180dc17100..735d476abb 100644 --- a/Ghidra/RuntimeScripts/Common/support/launch.properties +++ b/Ghidra/RuntimeScripts/Common/support/launch.properties @@ -72,6 +72,7 @@ VMARGS=-Xshare:off # Permit "illegal reflective accesses" to enable JDK compatibility with Ghidra and 3rd party jars. VMARGS=--add-opens java.base/java.lang=ALL-UNNAMED VMARGS=--add-opens java.base/java.util=ALL-UNNAMED +VMARGS=--add-opens java.base/java.net=ALL-UNNAMED VMARGS=--add-opens java.desktop/sun.awt.image=ALL-UNNAMED VMARGS_LINUX=--add-opens java.desktop/sun.awt.X11=ALL-UNNAMED