From 23e221df1b9f3b2f0b3d6f361a88b375b552b669 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 3 Feb 2023 10:47:25 +0100 Subject: [PATCH 1/7] Replace deprecated actions/create-release action by softprops/action-gh-release --- .github/workflows/build.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index afa00dc..4b1b80c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,11 +30,9 @@ jobs: name: artifacts path: target/*.jar - name: Create Release - uses: actions/create-release@v1 #NOTE: action is not maintained and repo is archived + uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot" with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - prerelease: true \ No newline at end of file + prerelease: true + token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} + generate_release_notes: true \ No newline at end of file From 9793d4569bacf74d95ad550286ad4e9307e56c2f Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 23 Feb 2023 15:40:26 +0100 Subject: [PATCH 2/7] Actually negate pattern --- .../frontend/fuse/mount/WinFspNetworkMountProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java b/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java index 8502345..0883e02 100644 --- a/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java +++ b/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java @@ -22,7 +22,7 @@ @OperatingSystem(OperatingSystem.Value.WINDOWS) public class WinFspNetworkMountProvider extends WinFspMountProvider { - private static final Pattern HOST_NAME_PATTERN_NEGATED = Pattern.compile("[a-zA-Z0-9-._~]+"); // all but unreserved chars according to https://www.rfc-editor.org/rfc/rfc3986#section-2.3 + private static final Pattern HOST_NAME_PATTERN_NEGATED = Pattern.compile("[^a-zA-Z0-9-._~]+"); // all but unreserved chars according to https://www.rfc-editor.org/rfc/rfc3986#section-2.3 @Override public String displayName() { From 4ad9875094fb651e70843de86e3d9002e60c89f7 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 24 Feb 2023 13:45:10 +0100 Subject: [PATCH 3/7] ignore all ide specific files except already versioned ones --- .gitignore | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 7496fc9..b7218d5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,11 +15,5 @@ target/ pom.xml.versionsBackup # IntelliJ Settings Files (https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems) # -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/dictionaries -.idea/compiler.xml -.idea/encodings.xml -.idea/jarRepositories.xml -.idea/**/libraries/ +.idea/** *.iml From 7e46e89c06b3bf4a82f2c3e4db9b3ac96ae11c77 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 6 Mar 2023 14:29:33 +0100 Subject: [PATCH 4/7] use user specific uid/gid for FUSE-T --- .../fuse/mount/FuseTMountProvider.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java b/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java index 930a53f..a877a63 100644 --- a/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java +++ b/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java @@ -14,6 +14,7 @@ import org.cryptomator.jfuse.api.Fuse; import org.cryptomator.jfuse.api.FuseMountFailedException; +import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -37,6 +38,22 @@ public class FuseTMountProvider implements MountService { private static final String DYLIB_PATH = "/usr/local/lib/libfuse-t.dylib"; + private static final int USER_ID; + private static final int GROUP_ID; + + static { + int uid = 65534, gid = 65534; //usually nobody + Path userHome = Paths.get(System.getProperty("user.home")); + try { + uid = (int) Files.getAttribute(userHome, "unix:uid"); + gid = (int) Files.getAttribute(userHome, "unix:gid"); + } catch (IOException e) { + //no-op + } + USER_ID = uid; + GROUP_ID = gid; + } + @Override public String displayName() { @@ -66,7 +83,9 @@ public int getDefaultLoopbackPort() { @Override public String getDefaultMountFlags() { // see: https://github.com/macos-fuse-t/fuse-t/wiki#supported-mount-options - return "-orwsize=262144"; + return "-orwsize=262144" + + " -ouid=" + USER_ID // + + " -ogid=" + GROUP_ID; } private static class FuseTMountBuilder extends AbstractMacMountBuilder { From 89e7cffe18bf6c2d37806139e54c42faa13461fb Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 6 Mar 2023 15:48:41 +0100 Subject: [PATCH 5/7] suppress false positve --- pom.xml | 2 +- suppression.xml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae9fe2a..440756a 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.4.3 - 8.1.0 + 8.1.2 3.1.0 diff --git a/suppression.xml b/suppression.xml index bb67725..c0edcc0 100644 --- a/suppression.xml +++ b/suppression.xml @@ -41,4 +41,12 @@ CVE-2018-10906 + + + ^pkg:maven/com\.google\.guava/guava@.*$ + CVE-2020-8908 + CVE-2020-8908 + \ No newline at end of file From 4f9016ba6fb1b5c46d79ca715456bc4d24b5938c Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Tue, 7 Mar 2023 11:04:16 +0100 Subject: [PATCH 6/7] refactored uid/gid for FUSE-T --- .../fuse/mount/FuseTMountProvider.java | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java b/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java index a877a63..143eec1 100644 --- a/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java +++ b/src/main/java/org/cryptomator/frontend/fuse/mount/FuseTMountProvider.java @@ -15,6 +15,7 @@ import org.cryptomator.jfuse.api.FuseMountFailedException; import java.io.IOException; +import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -38,22 +39,7 @@ public class FuseTMountProvider implements MountService { private static final String DYLIB_PATH = "/usr/local/lib/libfuse-t.dylib"; - private static final int USER_ID; - private static final int GROUP_ID; - - static { - int uid = 65534, gid = 65534; //usually nobody - Path userHome = Paths.get(System.getProperty("user.home")); - try { - uid = (int) Files.getAttribute(userHome, "unix:uid"); - gid = (int) Files.getAttribute(userHome, "unix:gid"); - } catch (IOException e) { - //no-op - } - USER_ID = uid; - GROUP_ID = gid; - } - + private static final Path USER_HOME = Paths.get(System.getProperty("user.home")); @Override public String displayName() { @@ -83,9 +69,13 @@ public int getDefaultLoopbackPort() { @Override public String getDefaultMountFlags() { // see: https://github.com/macos-fuse-t/fuse-t/wiki#supported-mount-options - return "-orwsize=262144" - + " -ouid=" + USER_ID // - + " -ogid=" + GROUP_ID; + try { + return "-orwsize=262144" // + + " -ouid=" + Files.getAttribute(USER_HOME, "unix:uid") // + + " -ogid=" + Files.getAttribute(USER_HOME, "unix:gid"); + } catch (IOException e) { + throw new UncheckedIOException(e); + } } private static class FuseTMountBuilder extends AbstractMacMountBuilder { From bb32e253fcb64607bd3a2724d1c7f7ca5437f83f Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Tue, 7 Mar 2023 11:07:59 +0100 Subject: [PATCH 7/7] prepare 2.0.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 440756a..2456e3b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.cryptomator fuse-nio-adapter - 2.1.0-SNAPSHOT + 2.0.3 FUSE-NIO-Adapter Access resources at a given NIO path via FUSE. https://github.com/cryptomator/fuse-nio-adapter