From 3b589ff68bb3873a7451e79a172fdf8c7879cda6 Mon Sep 17 00:00:00 2001 From: Phu Tu Date: Thu, 14 Sep 2023 12:58:57 +0200 Subject: [PATCH 1/2] Restrict permission to the .m2 subdirectory only --- resources/.java.policy_move_to_home_dir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/.java.policy_move_to_home_dir b/resources/.java.policy_move_to_home_dir index eaa36ea..6962c5a 100644 --- a/resources/.java.policy_move_to_home_dir +++ b/resources/.java.policy_move_to_home_dir @@ -50,7 +50,7 @@ grant { permission java.io.FilePermission "${user.dir}/-", "write, read, delete"; permission java.io.FilePermission "${java.io.tmpdir}/-", "write, read, delete"; - permission java.io.FilePermission "${user.home}/-", "read"; + permission java.io.FilePermission "${user.home}/.m2/-", "read"; // Please adapt these paths to all parent paths of your user home directory // Some Fix Code searches a .project file to determine an encoding From 5bf3a1261ce6b57cad8a7ed5d9a34e376a02ef34 Mon Sep 17 00:00:00 2001 From: Phu Tu Date: Mon, 18 Sep 2023 12:11:08 +0200 Subject: [PATCH 2/2] Correct URLpermission syntax --- resources/.java.policy_move_to_home_dir | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/.java.policy_move_to_home_dir b/resources/.java.policy_move_to_home_dir index 6962c5a..c2e0224 100644 --- a/resources/.java.policy_move_to_home_dir +++ b/resources/.java.policy_move_to_home_dir @@ -79,7 +79,8 @@ grant { permission java.net.SocketPermission "localhost:1024-", "accept, listen, resolve"; permission java.net.SocketPermission "*", "accept, connect, resolve"; - permission java.net.URLPermission "*", "GET:Accept"; + permission java.net.URLPermission "http:*", "GET:Accept"; + permission java.net.URLPermission "https:*", "GET:Accept"; permission java.net.NetPermission "getProxySelector"; };