From 0d57ebb24a2776150f6302a7a648187f36d8bcb8 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Mon, 21 Mar 2016 16:44:01 +0100 Subject: [PATCH 01/16] Patch 1.0.2 --- main/commons-test/pom.xml | 9 ++++++--- main/commons/pom.xml | 9 ++++++--- main/filesystem-api/pom.xml | 2 +- main/filesystem-crypto-integration-tests/pom.xml | 2 +- main/filesystem-crypto/pom.xml | 2 +- main/filesystem-inmemory/pom.xml | 2 +- main/filesystem-invariants-tests/pom.xml | 2 +- main/filesystem-nameshortening/pom.xml | 2 +- main/filesystem-nio/pom.xml | 2 +- main/filesystem-stats/pom.xml | 2 +- main/frontend-api/pom.xml | 2 +- main/frontend-webdav/pom.xml | 2 +- main/pom.xml | 2 +- main/uber-jar/pom.xml | 2 +- main/ui/pom.xml | 2 +- 15 files changed, 25 insertions(+), 19 deletions(-) diff --git a/main/commons-test/pom.xml b/main/commons-test/pom.xml index 10d63b39d..07bc0be9c 100644 --- a/main/commons-test/pom.xml +++ b/main/commons-test/pom.xml @@ -1,13 +1,16 @@ - + 4.0.0 org.cryptomator main - 1.0.1 + 1.0.2 commons-test Cryptomator common test dependencies diff --git a/main/commons/pom.xml b/main/commons/pom.xml index d90f7d91c..9c93d6ca2 100644 --- a/main/commons/pom.xml +++ b/main/commons/pom.xml @@ -1,13 +1,16 @@ - + 4.0.0 org.cryptomator main - 1.0.1 + 1.0.2 commons Cryptomator common diff --git a/main/filesystem-api/pom.xml b/main/filesystem-api/pom.xml index 273f34492..31eab656d 100644 --- a/main/filesystem-api/pom.xml +++ b/main/filesystem-api/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-api Cryptomator filesystem: API diff --git a/main/filesystem-crypto-integration-tests/pom.xml b/main/filesystem-crypto-integration-tests/pom.xml index 6135e1918..4aa2f1bf1 100644 --- a/main/filesystem-crypto-integration-tests/pom.xml +++ b/main/filesystem-crypto-integration-tests/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-crypto-integration-tests Cryptomator filesystem: Encryption layer tests diff --git a/main/filesystem-crypto/pom.xml b/main/filesystem-crypto/pom.xml index e036be507..7c69060f1 100644 --- a/main/filesystem-crypto/pom.xml +++ b/main/filesystem-crypto/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-crypto Cryptomator filesystem: Encryption layer diff --git a/main/filesystem-inmemory/pom.xml b/main/filesystem-inmemory/pom.xml index 569cab34d..58940314b 100644 --- a/main/filesystem-inmemory/pom.xml +++ b/main/filesystem-inmemory/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-inmemory Cryptomator filesystem: In-memory mock diff --git a/main/filesystem-invariants-tests/pom.xml b/main/filesystem-invariants-tests/pom.xml index 1ad755a3a..4c96783ce 100644 --- a/main/filesystem-invariants-tests/pom.xml +++ b/main/filesystem-invariants-tests/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-invariants-tests Cryptomator filesystem: Invariants tests diff --git a/main/filesystem-nameshortening/pom.xml b/main/filesystem-nameshortening/pom.xml index d2923791b..c4b4230ef 100644 --- a/main/filesystem-nameshortening/pom.xml +++ b/main/filesystem-nameshortening/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-nameshortening Cryptomator filesystem: Name shortening layer diff --git a/main/filesystem-nio/pom.xml b/main/filesystem-nio/pom.xml index 911d17d77..f5c7fea98 100644 --- a/main/filesystem-nio/pom.xml +++ b/main/filesystem-nio/pom.xml @@ -7,7 +7,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-nio Cryptomator filesystem: NIO-based physical layer diff --git a/main/filesystem-stats/pom.xml b/main/filesystem-stats/pom.xml index 02da75324..2aba1c5cd 100644 --- a/main/filesystem-stats/pom.xml +++ b/main/filesystem-stats/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 filesystem-stats Cryptomator filesystem: Throughput statistics diff --git a/main/frontend-api/pom.xml b/main/frontend-api/pom.xml index 9890933de..2fd2e134e 100644 --- a/main/frontend-api/pom.xml +++ b/main/frontend-api/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 frontend-api Cryptomator frontend: API diff --git a/main/frontend-webdav/pom.xml b/main/frontend-webdav/pom.xml index f728e838b..375172c0b 100644 --- a/main/frontend-webdav/pom.xml +++ b/main/frontend-webdav/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 frontend-webdav Cryptomator frontend: WebDAV frontend diff --git a/main/pom.xml b/main/pom.xml index 90c97c03b..5fd7778b0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.cryptomator main - 1.0.1 + 1.0.2 pom Cryptomator diff --git a/main/uber-jar/pom.xml b/main/uber-jar/pom.xml index 4716f9e09..c7660f3f4 100644 --- a/main/uber-jar/pom.xml +++ b/main/uber-jar/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 uber-jar pom diff --git a/main/ui/pom.xml b/main/ui/pom.xml index 41ca04205..74f153e28 100644 --- a/main/ui/pom.xml +++ b/main/ui/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.1 + 1.0.2 ui Cryptomator GUI From f77ba908da4d14d7557ea0a58afab1f90e68d6e0 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 25 Mar 2016 16:43:44 +0100 Subject: [PATCH 02/16] Patch 1.0.3 --- main/commons-test/pom.xml | 2 +- main/commons/pom.xml | 2 +- main/filesystem-api/pom.xml | 2 +- main/filesystem-crypto-integration-tests/pom.xml | 2 +- main/filesystem-crypto/pom.xml | 2 +- main/filesystem-inmemory/pom.xml | 2 +- main/filesystem-invariants-tests/pom.xml | 2 +- main/filesystem-nameshortening/pom.xml | 2 +- main/filesystem-nio/pom.xml | 2 +- main/filesystem-stats/pom.xml | 2 +- main/frontend-api/pom.xml | 2 +- main/frontend-webdav/pom.xml | 2 +- main/pom.xml | 2 +- main/uber-jar/pom.xml | 2 +- main/ui/pom.xml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/main/commons-test/pom.xml b/main/commons-test/pom.xml index 07bc0be9c..2f33d2af8 100644 --- a/main/commons-test/pom.xml +++ b/main/commons-test/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 commons-test Cryptomator common test dependencies diff --git a/main/commons/pom.xml b/main/commons/pom.xml index 9c93d6ca2..b41730726 100644 --- a/main/commons/pom.xml +++ b/main/commons/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 commons Cryptomator common diff --git a/main/filesystem-api/pom.xml b/main/filesystem-api/pom.xml index 31eab656d..dc9441e81 100644 --- a/main/filesystem-api/pom.xml +++ b/main/filesystem-api/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-api Cryptomator filesystem: API diff --git a/main/filesystem-crypto-integration-tests/pom.xml b/main/filesystem-crypto-integration-tests/pom.xml index 4aa2f1bf1..5f84b2470 100644 --- a/main/filesystem-crypto-integration-tests/pom.xml +++ b/main/filesystem-crypto-integration-tests/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-crypto-integration-tests Cryptomator filesystem: Encryption layer tests diff --git a/main/filesystem-crypto/pom.xml b/main/filesystem-crypto/pom.xml index 7c69060f1..206c49b5c 100644 --- a/main/filesystem-crypto/pom.xml +++ b/main/filesystem-crypto/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-crypto Cryptomator filesystem: Encryption layer diff --git a/main/filesystem-inmemory/pom.xml b/main/filesystem-inmemory/pom.xml index 58940314b..6fc38e10e 100644 --- a/main/filesystem-inmemory/pom.xml +++ b/main/filesystem-inmemory/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-inmemory Cryptomator filesystem: In-memory mock diff --git a/main/filesystem-invariants-tests/pom.xml b/main/filesystem-invariants-tests/pom.xml index 4c96783ce..db2b9feaf 100644 --- a/main/filesystem-invariants-tests/pom.xml +++ b/main/filesystem-invariants-tests/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-invariants-tests Cryptomator filesystem: Invariants tests diff --git a/main/filesystem-nameshortening/pom.xml b/main/filesystem-nameshortening/pom.xml index c4b4230ef..5e71e1ed9 100644 --- a/main/filesystem-nameshortening/pom.xml +++ b/main/filesystem-nameshortening/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-nameshortening Cryptomator filesystem: Name shortening layer diff --git a/main/filesystem-nio/pom.xml b/main/filesystem-nio/pom.xml index f5c7fea98..9c6042911 100644 --- a/main/filesystem-nio/pom.xml +++ b/main/filesystem-nio/pom.xml @@ -7,7 +7,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-nio Cryptomator filesystem: NIO-based physical layer diff --git a/main/filesystem-stats/pom.xml b/main/filesystem-stats/pom.xml index 2aba1c5cd..138624c12 100644 --- a/main/filesystem-stats/pom.xml +++ b/main/filesystem-stats/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 filesystem-stats Cryptomator filesystem: Throughput statistics diff --git a/main/frontend-api/pom.xml b/main/frontend-api/pom.xml index 2fd2e134e..0aab2980d 100644 --- a/main/frontend-api/pom.xml +++ b/main/frontend-api/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 frontend-api Cryptomator frontend: API diff --git a/main/frontend-webdav/pom.xml b/main/frontend-webdav/pom.xml index 375172c0b..628c915c8 100644 --- a/main/frontend-webdav/pom.xml +++ b/main/frontend-webdav/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 frontend-webdav Cryptomator frontend: WebDAV frontend diff --git a/main/pom.xml b/main/pom.xml index 5fd7778b0..f0a8d816d 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.cryptomator main - 1.0.2 + 1.0.3 pom Cryptomator diff --git a/main/uber-jar/pom.xml b/main/uber-jar/pom.xml index c7660f3f4..31c1aa935 100644 --- a/main/uber-jar/pom.xml +++ b/main/uber-jar/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 uber-jar pom diff --git a/main/ui/pom.xml b/main/ui/pom.xml index 74f153e28..cc2b47fe3 100644 --- a/main/ui/pom.xml +++ b/main/ui/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.2 + 1.0.3 ui Cryptomator GUI From 89c04ad83ba3cc611c9f6fd440ae45d635462467 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Sun, 10 Apr 2016 01:57:26 +0200 Subject: [PATCH 03/16] test release 1.0.3b --- main/ant-kit/pom.xml | 2 +- main/commons-test/pom.xml | 2 +- main/commons/pom.xml | 2 +- main/filesystem-api/pom.xml | 2 +- main/filesystem-crypto-integration-tests/pom.xml | 2 +- main/filesystem-crypto/pom.xml | 2 +- main/filesystem-inmemory/pom.xml | 2 +- main/filesystem-invariants-tests/pom.xml | 2 +- main/filesystem-nameshortening/pom.xml | 2 +- main/filesystem-nio/pom.xml | 2 +- main/filesystem-stats/pom.xml | 2 +- main/frontend-api/pom.xml | 2 +- main/frontend-webdav/pom.xml | 2 +- main/pom.xml | 2 +- main/uber-jar/pom.xml | 2 +- main/ui/pom.xml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/main/ant-kit/pom.xml b/main/ant-kit/pom.xml index 1556f4b99..cb960f4aa 100644 --- a/main/ant-kit/pom.xml +++ b/main/ant-kit/pom.xml @@ -8,7 +8,7 @@ org.cryptomator main - 1.1.0-SNAPSHOT + 1.0.3b ant-kit pom diff --git a/main/commons-test/pom.xml b/main/commons-test/pom.xml index 2f33d2af8..9569e3385 100644 --- a/main/commons-test/pom.xml +++ b/main/commons-test/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b commons-test Cryptomator common test dependencies diff --git a/main/commons/pom.xml b/main/commons/pom.xml index b41730726..34514ea33 100644 --- a/main/commons/pom.xml +++ b/main/commons/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b commons Cryptomator common diff --git a/main/filesystem-api/pom.xml b/main/filesystem-api/pom.xml index dc9441e81..3836212f7 100644 --- a/main/filesystem-api/pom.xml +++ b/main/filesystem-api/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-api Cryptomator filesystem: API diff --git a/main/filesystem-crypto-integration-tests/pom.xml b/main/filesystem-crypto-integration-tests/pom.xml index 5f84b2470..150a107af 100644 --- a/main/filesystem-crypto-integration-tests/pom.xml +++ b/main/filesystem-crypto-integration-tests/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-crypto-integration-tests Cryptomator filesystem: Encryption layer tests diff --git a/main/filesystem-crypto/pom.xml b/main/filesystem-crypto/pom.xml index 206c49b5c..0967bbe7f 100644 --- a/main/filesystem-crypto/pom.xml +++ b/main/filesystem-crypto/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-crypto Cryptomator filesystem: Encryption layer diff --git a/main/filesystem-inmemory/pom.xml b/main/filesystem-inmemory/pom.xml index 6fc38e10e..1edc3d3cf 100644 --- a/main/filesystem-inmemory/pom.xml +++ b/main/filesystem-inmemory/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-inmemory Cryptomator filesystem: In-memory mock diff --git a/main/filesystem-invariants-tests/pom.xml b/main/filesystem-invariants-tests/pom.xml index db2b9feaf..b18bb6323 100644 --- a/main/filesystem-invariants-tests/pom.xml +++ b/main/filesystem-invariants-tests/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-invariants-tests Cryptomator filesystem: Invariants tests diff --git a/main/filesystem-nameshortening/pom.xml b/main/filesystem-nameshortening/pom.xml index 5e71e1ed9..102f605ae 100644 --- a/main/filesystem-nameshortening/pom.xml +++ b/main/filesystem-nameshortening/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-nameshortening Cryptomator filesystem: Name shortening layer diff --git a/main/filesystem-nio/pom.xml b/main/filesystem-nio/pom.xml index 9c6042911..7c33d049f 100644 --- a/main/filesystem-nio/pom.xml +++ b/main/filesystem-nio/pom.xml @@ -7,7 +7,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-nio Cryptomator filesystem: NIO-based physical layer diff --git a/main/filesystem-stats/pom.xml b/main/filesystem-stats/pom.xml index 138624c12..b9a583c12 100644 --- a/main/filesystem-stats/pom.xml +++ b/main/filesystem-stats/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b filesystem-stats Cryptomator filesystem: Throughput statistics diff --git a/main/frontend-api/pom.xml b/main/frontend-api/pom.xml index 0aab2980d..bcc194593 100644 --- a/main/frontend-api/pom.xml +++ b/main/frontend-api/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b frontend-api Cryptomator frontend: API diff --git a/main/frontend-webdav/pom.xml b/main/frontend-webdav/pom.xml index 628c915c8..3c077e3ab 100644 --- a/main/frontend-webdav/pom.xml +++ b/main/frontend-webdav/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b frontend-webdav Cryptomator frontend: WebDAV frontend diff --git a/main/pom.xml b/main/pom.xml index 85d76de7e..93b0befcc 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.cryptomator main - 1.0.3 + 1.0.3b pom Cryptomator diff --git a/main/uber-jar/pom.xml b/main/uber-jar/pom.xml index 31c1aa935..61f528d16 100644 --- a/main/uber-jar/pom.xml +++ b/main/uber-jar/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b uber-jar pom diff --git a/main/ui/pom.xml b/main/ui/pom.xml index cc2b47fe3..cf8dce29b 100644 --- a/main/ui/pom.xml +++ b/main/ui/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3 + 1.0.3b ui Cryptomator GUI From 1df6589dd783e11f5515e3f553a9bc9ea8664a5d Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Sun, 10 Apr 2016 02:36:10 +0200 Subject: [PATCH 04/16] make sure, .tar.gz is built on travis --- main/ant-kit/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main/ant-kit/pom.xml b/main/ant-kit/pom.xml index cb960f4aa..494d3ac47 100644 --- a/main/ant-kit/pom.xml +++ b/main/ant-kit/pom.xml @@ -73,6 +73,15 @@ org.apache.maven.plugins maven-assembly-plugin + + + make-assembly + package + + single + + + assembly.xml cryptomator_${project.version} From aa249dabb5fe012bf408b4df09b2d557f68bb9e3 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Thu, 14 Apr 2016 22:28:12 +0200 Subject: [PATCH 05/16] technical release 1.0.3c --- main/ant-kit/pom.xml | 2 +- main/commons-test/pom.xml | 2 +- main/commons/pom.xml | 2 +- main/filesystem-api/pom.xml | 2 +- main/filesystem-crypto-integration-tests/pom.xml | 2 +- main/filesystem-crypto/pom.xml | 2 +- main/filesystem-inmemory/pom.xml | 2 +- main/filesystem-invariants-tests/pom.xml | 2 +- main/filesystem-nameshortening/pom.xml | 2 +- main/filesystem-nio/pom.xml | 2 +- main/filesystem-stats/pom.xml | 2 +- main/frontend-api/pom.xml | 2 +- main/frontend-webdav/pom.xml | 2 +- main/pom.xml | 2 +- main/uber-jar/pom.xml | 2 +- main/ui/pom.xml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/main/ant-kit/pom.xml b/main/ant-kit/pom.xml index a021fb412..fd1d9dc6d 100644 --- a/main/ant-kit/pom.xml +++ b/main/ant-kit/pom.xml @@ -8,7 +8,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c ant-kit pom diff --git a/main/commons-test/pom.xml b/main/commons-test/pom.xml index 9569e3385..1bae3bc9a 100644 --- a/main/commons-test/pom.xml +++ b/main/commons-test/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c commons-test Cryptomator common test dependencies diff --git a/main/commons/pom.xml b/main/commons/pom.xml index 34514ea33..cf9586ce7 100644 --- a/main/commons/pom.xml +++ b/main/commons/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c commons Cryptomator common diff --git a/main/filesystem-api/pom.xml b/main/filesystem-api/pom.xml index 3836212f7..99bb32e57 100644 --- a/main/filesystem-api/pom.xml +++ b/main/filesystem-api/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-api Cryptomator filesystem: API diff --git a/main/filesystem-crypto-integration-tests/pom.xml b/main/filesystem-crypto-integration-tests/pom.xml index 150a107af..b9b1df313 100644 --- a/main/filesystem-crypto-integration-tests/pom.xml +++ b/main/filesystem-crypto-integration-tests/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-crypto-integration-tests Cryptomator filesystem: Encryption layer tests diff --git a/main/filesystem-crypto/pom.xml b/main/filesystem-crypto/pom.xml index 0967bbe7f..f9caaa014 100644 --- a/main/filesystem-crypto/pom.xml +++ b/main/filesystem-crypto/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-crypto Cryptomator filesystem: Encryption layer diff --git a/main/filesystem-inmemory/pom.xml b/main/filesystem-inmemory/pom.xml index 1edc3d3cf..3ba05f49c 100644 --- a/main/filesystem-inmemory/pom.xml +++ b/main/filesystem-inmemory/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-inmemory Cryptomator filesystem: In-memory mock diff --git a/main/filesystem-invariants-tests/pom.xml b/main/filesystem-invariants-tests/pom.xml index b18bb6323..6fb6d2d53 100644 --- a/main/filesystem-invariants-tests/pom.xml +++ b/main/filesystem-invariants-tests/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-invariants-tests Cryptomator filesystem: Invariants tests diff --git a/main/filesystem-nameshortening/pom.xml b/main/filesystem-nameshortening/pom.xml index 102f605ae..c1149c313 100644 --- a/main/filesystem-nameshortening/pom.xml +++ b/main/filesystem-nameshortening/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-nameshortening Cryptomator filesystem: Name shortening layer diff --git a/main/filesystem-nio/pom.xml b/main/filesystem-nio/pom.xml index 7c33d049f..d2cc2b9fa 100644 --- a/main/filesystem-nio/pom.xml +++ b/main/filesystem-nio/pom.xml @@ -7,7 +7,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-nio Cryptomator filesystem: NIO-based physical layer diff --git a/main/filesystem-stats/pom.xml b/main/filesystem-stats/pom.xml index b9a583c12..6c38bf92b 100644 --- a/main/filesystem-stats/pom.xml +++ b/main/filesystem-stats/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c filesystem-stats Cryptomator filesystem: Throughput statistics diff --git a/main/frontend-api/pom.xml b/main/frontend-api/pom.xml index bcc194593..e1d1469c0 100644 --- a/main/frontend-api/pom.xml +++ b/main/frontend-api/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c frontend-api Cryptomator frontend: API diff --git a/main/frontend-webdav/pom.xml b/main/frontend-webdav/pom.xml index 3c077e3ab..e2db6040c 100644 --- a/main/frontend-webdav/pom.xml +++ b/main/frontend-webdav/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c frontend-webdav Cryptomator frontend: WebDAV frontend diff --git a/main/pom.xml b/main/pom.xml index 93b0befcc..696c174ed 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.cryptomator main - 1.0.3b + 1.0.3c pom Cryptomator diff --git a/main/uber-jar/pom.xml b/main/uber-jar/pom.xml index 61f528d16..d074a4b27 100644 --- a/main/uber-jar/pom.xml +++ b/main/uber-jar/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c uber-jar pom diff --git a/main/ui/pom.xml b/main/ui/pom.xml index cf8dce29b..b742fbd09 100644 --- a/main/ui/pom.xml +++ b/main/ui/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3b + 1.0.3c ui Cryptomator GUI From ad2c9116b995ead670e95cc516df461feaa48a25 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 3 May 2016 16:50:18 +0200 Subject: [PATCH 06/16] Release 1.0.4 --- main/ant-kit/pom.xml | 2 +- main/commons-test/pom.xml | 2 +- main/commons/pom.xml | 2 +- main/filesystem-api/pom.xml | 2 +- main/filesystem-crypto-integration-tests/pom.xml | 2 +- main/filesystem-crypto/pom.xml | 2 +- main/filesystem-inmemory/pom.xml | 2 +- main/filesystem-invariants-tests/pom.xml | 2 +- main/filesystem-nameshortening/pom.xml | 2 +- main/filesystem-nio/pom.xml | 2 +- main/filesystem-stats/pom.xml | 2 +- main/frontend-api/pom.xml | 2 +- main/frontend-webdav/pom.xml | 2 +- main/pom.xml | 2 +- main/uber-jar/pom.xml | 2 +- main/ui/pom.xml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/main/ant-kit/pom.xml b/main/ant-kit/pom.xml index c83a70aca..2d908221d 100644 --- a/main/ant-kit/pom.xml +++ b/main/ant-kit/pom.xml @@ -8,7 +8,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 ant-kit pom diff --git a/main/commons-test/pom.xml b/main/commons-test/pom.xml index 33c0fb113..f4790e045 100644 --- a/main/commons-test/pom.xml +++ b/main/commons-test/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 commons-test Cryptomator common test dependencies diff --git a/main/commons/pom.xml b/main/commons/pom.xml index 80105bdd0..077c9c21f 100644 --- a/main/commons/pom.xml +++ b/main/commons/pom.xml @@ -10,7 +10,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 commons Cryptomator common diff --git a/main/filesystem-api/pom.xml b/main/filesystem-api/pom.xml index b90415361..eeb68cbb8 100644 --- a/main/filesystem-api/pom.xml +++ b/main/filesystem-api/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-api Cryptomator filesystem: API diff --git a/main/filesystem-crypto-integration-tests/pom.xml b/main/filesystem-crypto-integration-tests/pom.xml index fa919a469..51562756c 100644 --- a/main/filesystem-crypto-integration-tests/pom.xml +++ b/main/filesystem-crypto-integration-tests/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-crypto-integration-tests Cryptomator filesystem: Encryption layer tests diff --git a/main/filesystem-crypto/pom.xml b/main/filesystem-crypto/pom.xml index 8d768460d..1b0e58d79 100644 --- a/main/filesystem-crypto/pom.xml +++ b/main/filesystem-crypto/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-crypto Cryptomator filesystem: Encryption layer diff --git a/main/filesystem-inmemory/pom.xml b/main/filesystem-inmemory/pom.xml index 69c340da8..ab1dad562 100644 --- a/main/filesystem-inmemory/pom.xml +++ b/main/filesystem-inmemory/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-inmemory Cryptomator filesystem: In-memory mock diff --git a/main/filesystem-invariants-tests/pom.xml b/main/filesystem-invariants-tests/pom.xml index 58c7b3e92..e1e4949c8 100644 --- a/main/filesystem-invariants-tests/pom.xml +++ b/main/filesystem-invariants-tests/pom.xml @@ -9,7 +9,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-invariants-tests Cryptomator filesystem: Invariants tests diff --git a/main/filesystem-nameshortening/pom.xml b/main/filesystem-nameshortening/pom.xml index 49b55bfef..512658b86 100644 --- a/main/filesystem-nameshortening/pom.xml +++ b/main/filesystem-nameshortening/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-nameshortening Cryptomator filesystem: Name shortening layer diff --git a/main/filesystem-nio/pom.xml b/main/filesystem-nio/pom.xml index e227871af..b82e0ab0a 100644 --- a/main/filesystem-nio/pom.xml +++ b/main/filesystem-nio/pom.xml @@ -7,7 +7,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-nio Cryptomator filesystem: NIO-based physical layer diff --git a/main/filesystem-stats/pom.xml b/main/filesystem-stats/pom.xml index af470f90c..76fb5d7bb 100644 --- a/main/filesystem-stats/pom.xml +++ b/main/filesystem-stats/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 filesystem-stats Cryptomator filesystem: Throughput statistics diff --git a/main/frontend-api/pom.xml b/main/frontend-api/pom.xml index e87fbefdd..cb9faac1d 100644 --- a/main/frontend-api/pom.xml +++ b/main/frontend-api/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 frontend-api Cryptomator frontend: API diff --git a/main/frontend-webdav/pom.xml b/main/frontend-webdav/pom.xml index 81fedcb28..d9900ccc4 100644 --- a/main/frontend-webdav/pom.xml +++ b/main/frontend-webdav/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 frontend-webdav Cryptomator frontend: WebDAV frontend diff --git a/main/pom.xml b/main/pom.xml index f306852b6..806b96edd 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.cryptomator main - 1.0.3d + 1.0.4 pom Cryptomator diff --git a/main/uber-jar/pom.xml b/main/uber-jar/pom.xml index b9f888628..13b6a3631 100644 --- a/main/uber-jar/pom.xml +++ b/main/uber-jar/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 uber-jar pom diff --git a/main/ui/pom.xml b/main/ui/pom.xml index 4057ae8a0..36eb3d20a 100644 --- a/main/ui/pom.xml +++ b/main/ui/pom.xml @@ -12,7 +12,7 @@ org.cryptomator main - 1.0.3d + 1.0.4 ui Cryptomator GUI From 6006d65ce01e8f0852aadae8e5601f0e3dffce96 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 10 May 2016 14:26:06 +0200 Subject: [PATCH 07/16] new ant kit using a custom launcher binary due to #265 --- main/ant-kit/assembly.xml | 6 ++ main/ant-kit/pom.xml | 10 ++++ main/ant-kit/src/main/resources/build.xml | 1 + .../fixed-binaries/linux-launcher-x64 | Bin 0 -> 10585 bytes .../fixed-binaries/linux-launcher-x86 | Bin 0 -> 7979 bytes .../src/main/resources/package/linux/postinst | 50 ++++++++++++++++ .../src/main/resources/package/linux/spec | 54 ++++++++++++++++++ 7 files changed, 121 insertions(+) create mode 100644 main/ant-kit/src/main/resources/fixed-binaries/linux-launcher-x64 create mode 100644 main/ant-kit/src/main/resources/fixed-binaries/linux-launcher-x86 create mode 100644 main/ant-kit/src/main/resources/package/linux/postinst create mode 100644 main/ant-kit/src/main/resources/package/linux/spec diff --git a/main/ant-kit/assembly.xml b/main/ant-kit/assembly.xml index afea7ec94..4ca4dfd66 100644 --- a/main/ant-kit/assembly.xml +++ b/main/ant-kit/assembly.xml @@ -14,6 +14,12 @@ libs + + target/fixed-binaries + false + fixed-binaries + 755 + target/package false diff --git a/main/ant-kit/pom.xml b/main/ant-kit/pom.xml index 2d908221d..cc3c15519 100644 --- a/main/ant-kit/pom.xml +++ b/main/ant-kit/pom.xml @@ -60,6 +60,16 @@ src/main/resources true + + fixed-binaries/** + + + + src/main/resources + false + + fixed-binaries/** + diff --git a/main/ant-kit/src/main/resources/build.xml b/main/ant-kit/src/main/resources/build.xml index 0ca9be55e..06dcfc257 100644 --- a/main/ant-kit/src/main/resources/build.xml +++ b/main/ant-kit/src/main/resources/build.xml @@ -50,6 +50,7 @@ + diff --git a/main/ant-kit/src/main/resources/fixed-binaries/linux-launcher-x64 b/main/ant-kit/src/main/resources/fixed-binaries/linux-launcher-x64 new file mode 100644 index 0000000000000000000000000000000000000000..bffda959ae26be7d7d31a393865a03c3a3e18953 GIT binary patch literal 10585 zcmcIq4R9OBbzT4@Mg5qBWI1*u*+OE9jJD`t%H1I?DeK(i(@Ot)IFV9I(ALy!FYu!;TLoJ<_tzIAgl)|yPD zM#fslI<~iN-x|!NgIlEk)NJaz-Fy3_Y3`3T;Hd7^xTwph{QKXU`~H_c|MjmOzxUz~ z|KoW1#n=m9e`+PlZox%%R^g(w0@uyBNcSVSmg3@cqsrXC04TM~HvObOw&F^b{7~I3 zmLR_z*D_o*U%0*8U*s33CS+81OMUW<=L^XMz!FAjy!-HrR<8QJ0GQipm-q|}R>POq zzSE zJlmO!8z06!or$LeOyta1^b?;TGuwsHy?>7pi)WSU{ym+^bSl0- zaxfXU%Bq%R%%N;N5;LNaR5YFx#-n>5?9FY9!kcVpl-S-}CLHQ{Flyzy+8OO^Cv@L~ zy^-!{$SREVRs;!z1S}YXV`D}pp3S9Gkz~RgH%8l}G)XwDjZ%Y#t+pUH7=;tWwF{#! z^>`u`L$BmUhT|j_wZw99GntM?(7;SKkund7SR$K>K!lovfOZ(wleFsF;YcDSc6W9f zcLm$T?r`_cPGd`OOK_X$?C;;Pv)gD7-etl4{Sc8M){E$7T{L!-vtmqL1+7CIB$);o zXFP};>oFH7-UV>=+%b+Y)F7S!Mv2NP%jF|$5(s~F;)}NOdy#jR`)uW2xpq)Fr62wI zVT8AO@vPD@H~j%Zomc#!ve$UyfRv*cYF{5VDxBh^5|wgoHk@NA6?E9}$`T1&v*8?D zNnW?%_Vv2QhI33N`FG-$FbMW$BdU? zJ)M0G1JrZzdi!}mq=DW`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z(PZNqxph>u)q8+NmS%kKoP#Pw~qtH>~- zNuw#A+!2l&Q9GH=7~yQIz;-qjH*GT-T(sn7+&EuK$>3I7ZIcabeba41ZMCD>=H@n3 zaUp{{^iit%xEze6Qn=9GTsOZQSNhJqdN^XoT1+F=5?WApaVgFRhOvBIrZ4uc=$Rtg_BnyL@>=XuYw%a#>x78lyT89bF)g^TMdUV@>7i+A6_ay}IpIm-6Z= zzM?|jaXZ)9yyKVG`j;qHcl-qcb%!3wWTn@Hw*S>%F-Ct}D6ra?GOS(t#@>m-(ZF|MP3esLuw{0sLH1&?8#VQ8xN(isACB{3bK1Wdq9kaXP*o`8ZP0 zh7rvq4J(|8;@md;`NC~Yefb$F!Pk%x|1%PtZyh5V3~`*}^kZ>-!5Q7Q{wU(EdC}LP z`3q}IyFQ(4!pXBfY+LvwWF`=EraUj|&qMrrGuk*p{i2UO6&0=zDx<&YptAEF2I0N9 bd~vYJw2f56u&r!jXK+WWkl$)# `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + echo Adding shortcut to the menu +SECONDARY_LAUNCHERS_INSTALL +APP_CDS_CACHE + xdg-desktop-menu install --novendor /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop +FILE_ASSOCIATION_INSTALL + + rm /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME + if [ $(uname -m) = "x86_64" ]; then + mv /opt/APPLICATION_FS_NAME/app/linux-launcher-x64 /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME + else + mv /opt/APPLICATION_FS_NAME/app/linux-launcher-x86 /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/main/ant-kit/src/main/resources/package/linux/spec b/main/ant-kit/src/main/resources/package/linux/spec new file mode 100644 index 000000000..b40f9224e --- /dev/null +++ b/main/ant-kit/src/main/resources/package/linux/spec @@ -0,0 +1,54 @@ +Summary: APPLICATION_SUMMARY +Name: APPLICATION_PACKAGE +Version: APPLICATION_VERSION +Release: 1 +License: APPLICATION_LICENSE_TYPE +Vendor: APPLICATION_VENDOR +Prefix: /opt +Provides: APPLICATION_PACKAGE +Requires: ld-linux.so.2 libX11.so.6 libXext.so.6 libXi.so.6 libXrender.so.1 libXtst.so.6 libasound.so.2 libc.so.6 libdl.so.2 libgcc_s.so.1 libm.so.6 libpthread.so.0 libthread_db.so.1 +Autoprov: 0 +Autoreq: 0 + +#avoid ARCH subfolder +%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm + +#comment line below to enable effective jar compression +#it could easily get your package size from 40 to 15Mb but +#build time will substantially increase and it may require unpack200/system java to install +%define __jar_repack %{nil} + +%description +APPLICATION_DESCRIPTION + +%prep + +%build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/opt +cp -r %{_sourcedir}/APPLICATION_FS_NAME %{buildroot}/opt + +%files +APPLICATION_LICENSE_FILE +/opt/APPLICATION_FS_NAME + +%post +SECONDARY_LAUNCHERS_INSTALL +APP_CDS_CACHE +xdg-desktop-menu install --novendor /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop +FILE_ASSOCIATION_INSTALL +rm /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME +if [ $(uname -m) = "x86_64" ]; then + mv /opt/APPLICATION_FS_NAME/app/linux-launcher-x64 /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME +else + mv /opt/APPLICATION_FS_NAME/app/linux-launcher-x86 /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME +fi + +%preun +SECONDARY_LAUNCHERS_REMOVE +xdg-desktop-menu uninstall --novendor /opt/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop +FILE_ASSOCIATION_REMOVE + +%clean From 7b6c5318c5e8dd771680eebf45e6b31cb5e9556e Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 10 May 2016 14:31:55 +0200 Subject: [PATCH 08/16] fixes #263 --- .../cryptomator/ui/controllers/SettingsController.java | 8 ++++++-- .../main/java/org/cryptomator/ui/settings/Settings.java | 4 ++-- main/ui/src/main/resources/fxml/settings.fxml | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java b/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java index 80cd60cab..7c1532775 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java @@ -43,6 +43,9 @@ public class SettingsController extends LocalizedFXMLViewController { @FXML private TextField portField; + @FXML + private Label useIpv6Label; + @FXML private CheckBox useIpv6Checkbox; @@ -55,7 +58,8 @@ public class SettingsController extends LocalizedFXMLViewController { checkForUpdatesCheckbox.setSelected(settings.isCheckForUpdatesEnabled() && !areUpdatesManagedExternally()); portField.setText(String.valueOf(settings.getPort())); portField.addEventFilter(KeyEvent.KEY_TYPED, this::filterNumericKeyEvents); - useIpv6Checkbox.setDisable(!SystemUtils.IS_OS_WINDOWS); + useIpv6Label.setVisible(SystemUtils.IS_OS_WINDOWS); + useIpv6Checkbox.setVisible(SystemUtils.IS_OS_WINDOWS); useIpv6Checkbox.setSelected(SystemUtils.IS_OS_WINDOWS && settings.shouldUseIpv6()); versionLabel.setText(String.format(localization.getString("settings.version.label"), applicationVersion().orElse("SNAPSHOT"))); @@ -81,7 +85,7 @@ public class SettingsController extends LocalizedFXMLViewController { private void portDidChange(String newValue) { try { int port = Integer.parseInt(newValue); - if (port < Settings.MIN_PORT || port > Settings.MAX_PORT) { + if (!settings.isPortValid(port)) { settings.setPort(Settings.DEFAULT_PORT); } else { settings.setPort(port); diff --git a/main/ui/src/main/java/org/cryptomator/ui/settings/Settings.java b/main/ui/src/main/java/org/cryptomator/ui/settings/Settings.java index 17f7c5b25..6b00aeb41 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/settings/Settings.java +++ b/main/ui/src/main/java/org/cryptomator/ui/settings/Settings.java @@ -93,8 +93,8 @@ public class Settings implements Serializable { } } - private boolean isPortValid(int port) { - return port == DEFAULT_PORT || port >= MIN_PORT && port <= MAX_PORT; + public boolean isPortValid(int port) { + return port == DEFAULT_PORT || port >= MIN_PORT && port <= MAX_PORT || port == 0; } public boolean shouldUseIpv6() { diff --git a/main/ui/src/main/resources/fxml/settings.fxml b/main/ui/src/main/resources/fxml/settings.fxml index eebe54528..73f26630f 100644 --- a/main/ui/src/main/resources/fxml/settings.fxml +++ b/main/ui/src/main/resources/fxml/settings.fxml @@ -38,7 +38,7 @@ - diff --git a/main/commons/pom.xml b/main/commons/pom.xml index 194123564..5603f36b5 100644 --- a/main/commons/pom.xml +++ b/main/commons/pom.xml @@ -44,6 +44,11 @@ junit test + + org.mockito + mockito-core + test + de.bechte.junit junit-hierarchicalcontextrunner diff --git a/main/pom.xml b/main/pom.xml index 414017f36..75ba59663 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -275,14 +275,6 @@ org.apache.logging.log4j log4j-jul - - junit - junit - - - org.mockito - mockito-core - From 0d9f8eefc020fcab9a35e5d0d1cd146d5858f681 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Thu, 12 May 2016 11:51:14 +0200 Subject: [PATCH 11/16] Using pattern based filename filtering This is a preparation for finding valid encrypted names inside filenames that include additional characters --- .../crypto/engine/FilenameCryptor.java | 9 ++++----- .../crypto/engine/impl/FilenameCryptorImpl.java | 6 ++++-- .../filesystem/crypto/CryptoFolder.java | 17 ++++++++++++++--- .../crypto/engine/NoFilenameCryptor.java | 6 ++++-- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/FilenameCryptor.java b/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/FilenameCryptor.java index cb94a12fa..1226da4ed 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/FilenameCryptor.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/FilenameCryptor.java @@ -8,6 +8,8 @@ *******************************************************************************/ package org.cryptomator.crypto.engine; +import java.util.regex.Pattern; + /** * Provides deterministic encryption capabilities as filenames must not change on subsequent encryption attempts, * otherwise each change results in major directory structure changes which would be a terrible idea for cloud storage encryption. @@ -22,12 +24,9 @@ public interface FilenameCryptor { String hashDirectoryId(String cleartextDirectoryId); /** - * Tests without an actual decryption attempt, if a name is a well-formed ciphertext. - * - * @param ciphertextName Filename in question - * @return true if the given name is likely to be a valid ciphertext + * @return A Pattern that can be used to test, if a name is a well-formed ciphertext. */ - boolean isEncryptedFilename(String ciphertextName); + Pattern encryptedNamePattern(); /** * @param cleartextName original filename including cleartext file extension diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/impl/FilenameCryptorImpl.java b/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/impl/FilenameCryptorImpl.java index 5db611548..4b977d44d 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/impl/FilenameCryptorImpl.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/impl/FilenameCryptorImpl.java @@ -12,6 +12,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.util.regex.Pattern; import javax.crypto.AEADBadTagException; import javax.crypto.SecretKey; @@ -25,6 +26,7 @@ import org.cryptomator.siv.SivMode; class FilenameCryptorImpl implements FilenameCryptor { private static final BaseNCodec BASE32 = new Base32(); + private static final Pattern BASE32_PATTERN = Pattern.compile("([A-Z0-9]{8})*[A-Z0-9=]{8}"); private static final ThreadLocal SHA1 = new ThreadLocalSha1(); private static final ThreadLocal AES_SIV = new ThreadLocal() { @Override @@ -50,8 +52,8 @@ class FilenameCryptorImpl implements FilenameCryptor { } @Override - public boolean isEncryptedFilename(String ciphertextName) { - return BASE32.isInAlphabet(ciphertextName); + public Pattern encryptedNamePattern() { + return BASE32_PATTERN; } @Override diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java index c8228535c..3c2040ea3 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java @@ -18,6 +18,7 @@ import java.util.Optional; import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Predicate; +import java.util.regex.Matcher; import java.util.stream.Stream; import org.apache.commons.lang3.StringUtils; @@ -85,7 +86,10 @@ class CryptoFolder extends CryptoNode implements Folder { } private Predicate isEncryptedFileName() { - return (String name) -> !name.endsWith(DIR_SUFFIX) && cryptor.getFilenameCryptor().isEncryptedFilename(name); + return (String name) -> { + final Matcher m = cryptor.getFilenameCryptor().encryptedNamePattern().matcher(name); + return m.matches(); + }; } private String decryptChildFileName(String encryptedFileName) { @@ -109,7 +113,14 @@ class CryptoFolder extends CryptoNode implements Folder { } private Predicate isEncryptedDirectoryName() { - return (String name) -> name.endsWith(DIR_SUFFIX) && cryptor.getFilenameCryptor().isEncryptedFilename(StringUtils.removeEnd(name, DIR_SUFFIX)); + return (String name) -> { + if (name.endsWith(DIR_SUFFIX)) { + final Matcher m = cryptor.getFilenameCryptor().encryptedNamePattern().matcher(StringUtils.removeEnd(name, DIR_SUFFIX)); + return m.matches(); + } else { + return false; + } + }; } private String decryptChildFolderName(String encryptedFolderName) { @@ -176,7 +187,7 @@ class CryptoFolder extends CryptoNode implements Folder { // cut all ties: this.invalidateDirectoryIdsRecursively(); - assert!exists(); + assert !exists(); assert target.exists(); } diff --git a/main/filesystem-crypto/src/test/java/org/cryptomator/crypto/engine/NoFilenameCryptor.java b/main/filesystem-crypto/src/test/java/org/cryptomator/crypto/engine/NoFilenameCryptor.java index 9f3901f7e..590582ba8 100644 --- a/main/filesystem-crypto/src/test/java/org/cryptomator/crypto/engine/NoFilenameCryptor.java +++ b/main/filesystem-crypto/src/test/java/org/cryptomator/crypto/engine/NoFilenameCryptor.java @@ -12,6 +12,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.util.regex.Pattern; import org.apache.commons.codec.binary.Base32; import org.apache.commons.codec.binary.BaseNCodec; @@ -19,6 +20,7 @@ import org.apache.commons.codec.binary.BaseNCodec; class NoFilenameCryptor implements FilenameCryptor { private static final BaseNCodec BASE32 = new Base32(); + private static final Pattern WILDCARD_PATTERN = Pattern.compile(".*"); private static final ThreadLocal SHA1 = new ThreadLocalSha1(); @Override @@ -29,8 +31,8 @@ class NoFilenameCryptor implements FilenameCryptor { } @Override - public boolean isEncryptedFilename(String ciphertextName) { - return true; + public Pattern encryptedNamePattern() { + return WILDCARD_PATTERN; } @Override From 9fd6f2ecaef8f94d45365dba93e40abd8b672239 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Thu, 12 May 2016 16:08:52 +0200 Subject: [PATCH 12/16] transparently show sync conflicts (fixes #98) --- .../crypto/engine/CryptoException.java | 2 +- .../filesystem/crypto/ConflictResolver.java | 77 ++++++++++++ .../filesystem/crypto/CryptoFolder.java | 83 ++++++------- .../crypto/ConflictResolverTest.java | 110 ++++++++++++++++++ 4 files changed, 232 insertions(+), 40 deletions(-) create mode 100644 main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java create mode 100644 main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/CryptoException.java b/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/CryptoException.java index 5b9e81ade..f31431003 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/CryptoException.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/CryptoException.java @@ -8,7 +8,7 @@ *******************************************************************************/ package org.cryptomator.crypto.engine; -abstract class CryptoException extends RuntimeException { +public abstract class CryptoException extends RuntimeException { public CryptoException() { super(); diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java new file mode 100644 index 000000000..bfcd8660f --- /dev/null +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java @@ -0,0 +1,77 @@ +package org.cryptomator.filesystem.crypto; + +import static org.cryptomator.filesystem.crypto.Constants.DIR_SUFFIX; + +import java.util.UUID; +import java.util.function.UnaryOperator; +import java.util.regex.MatchResult; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.StringUtils; +import org.cryptomator.crypto.engine.CryptoException; +import org.cryptomator.filesystem.File; +import org.cryptomator.filesystem.Folder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +final class ConflictResolver { + + private static final Logger LOG = LoggerFactory.getLogger(ConflictResolver.class); + private static final int UUID_FIRST_GROUP_STRLEN = 8; + + private final Pattern encryptedNamePattern; + private final UnaryOperator nameDecryptor; + private final UnaryOperator nameEncryptor; + + public ConflictResolver(Pattern encryptedNamePattern, UnaryOperator nameDecryptor, UnaryOperator nameEncryptor) { + this.encryptedNamePattern = encryptedNamePattern; + this.nameDecryptor = nameDecryptor; + this.nameEncryptor = nameEncryptor; + } + + public File resolveIfNecessary(File file) { + Matcher m = encryptedNamePattern.matcher(StringUtils.removeEnd(file.name(), DIR_SUFFIX)); + if (m.matches()) { + // full match, use file as is + return file; + } else if (m.find(0)) { + // partial match, might be conflicting + return resolveConflict(file, m.toMatchResult()); + } else { + // no match, file not relevant + return file; + } + } + + private File resolveConflict(File conflictingFile, MatchResult matchResult) { + String ciphertext = matchResult.group(); + boolean isDirectory = conflictingFile.name().substring(matchResult.end()).startsWith(DIR_SUFFIX); + try { + String cleartext = nameDecryptor.apply(ciphertext); + Folder folder = conflictingFile.parent().get(); + File canonicalFile = folder.file(isDirectory ? ciphertext + DIR_SUFFIX : ciphertext); + if (canonicalFile.exists()) { + // CONFLICT!!!!!11 + String conflictId = createConflictId(); + String alternativeCleartext = cleartext + " (Conflict " + conflictId + ")"; + String alternativeCiphertext = nameEncryptor.apply(alternativeCleartext); + File alternativeFile = folder.file(isDirectory ? alternativeCiphertext + DIR_SUFFIX : alternativeCiphertext); + LOG.info("Detected conflict {}:\n{}\n{}", conflictId, canonicalFile, conflictingFile); + conflictingFile.moveTo(alternativeFile); + return alternativeFile; + } else { + conflictingFile.moveTo(canonicalFile); + return canonicalFile; + } + } catch (CryptoException e) { + // not decryptable; false positive + return conflictingFile; + } + } + + private String createConflictId() { + return UUID.randomUUID().toString().substring(0, UUID_FIRST_GROUP_STRLEN); + } + +} diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java index 3c2040ea3..39220e6af 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java @@ -18,7 +18,7 @@ import java.util.Optional; import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Predicate; -import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Stream; import org.apache.commons.lang3.StringUtils; @@ -37,11 +37,15 @@ class CryptoFolder extends CryptoNode implements Folder { private final WeakValuedCache folders = WeakValuedCache.usingLoader(this::newFolder); private final WeakValuedCache files = WeakValuedCache.usingLoader(this::newFile); private final AtomicReference directoryId = new AtomicReference<>(); + private final ConflictResolver conflictResolver; public CryptoFolder(CryptoFolder parent, String name, Cryptor cryptor) { super(parent, name, cryptor); + this.conflictResolver = new ConflictResolver(cryptor.getFilenameCryptor().encryptedNamePattern(), this::decryptChildName, this::encryptChildName); } + /* ======================= name + directory id ======================= */ + @Override protected Optional encryptedName() { if (parent().isPresent()) { @@ -74,27 +78,49 @@ class CryptoFolder extends CryptoNode implements Folder { })); } + /* ======================= children ======================= */ + @Override public Stream children() { return AutoClosingStream.from(Stream.concat(files(), folders())); } + private Stream nonConflictingFiles() { + final Stream files = physicalFolder().filter(Folder::exists).map(Folder::files).orElse(Stream.empty()); + return files.filter(containsEncryptedName()).map(conflictResolver::resolveIfNecessary); + } + + private Predicate containsEncryptedName() { + final Pattern encryptedNamePattern = cryptor.getFilenameCryptor().encryptedNamePattern(); + return (File file) -> encryptedNamePattern.matcher(file.name()).find(); + } + + private String decryptChildName(String ciphertextFileName) { + final byte[] dirId = getDirectoryId().get().getBytes(UTF_8); + return cryptor.getFilenameCryptor().decryptFilename(ciphertextFileName, dirId); + } + + private String encryptChildName(String cleartextFileName) { + final byte[] dirId = getDirectoryId().get().getBytes(UTF_8); + return cryptor.getFilenameCryptor().encryptFilename(cleartextFileName, dirId); + } + @Override public Stream files() { - final Stream files = physicalFolder().filter(Folder::exists).map(Folder::files).orElse(Stream.empty()); - return files.map(File::name).filter(isEncryptedFileName()).map(this::decryptChildFileName).map(this::file); + return nonConflictingFiles().map(File::name).filter(endsWithDirSuffix().negate()).map(this::decryptChildName).map(this::file); } - private Predicate isEncryptedFileName() { - return (String name) -> { - final Matcher m = cryptor.getFilenameCryptor().encryptedNamePattern().matcher(name); - return m.matches(); - }; + @Override + public Stream folders() { + return nonConflictingFiles().map(File::name).filter(endsWithDirSuffix()).map(this::removeDirSuffix).map(this::decryptChildName).map(this::folder); } - private String decryptChildFileName(String encryptedFileName) { - final byte[] dirId = getDirectoryId().get().getBytes(UTF_8); - return cryptor.getFilenameCryptor().decryptFilename(encryptedFileName, dirId); + private Predicate endsWithDirSuffix() { + return (String encryptedFolderName) -> StringUtils.endsWith(encryptedFolderName, DIR_SUFFIX); + } + + private String removeDirSuffix(String encryptedFolderName) { + return StringUtils.removeEnd(encryptedFolderName, DIR_SUFFIX); } @Override @@ -102,42 +128,21 @@ class CryptoFolder extends CryptoNode implements Folder { return files.get(name); } - public CryptoFile newFile(String name) { - return new CryptoFile(this, name, cryptor); - } - - @Override - public Stream folders() { - final Stream files = physicalFolder().filter(Folder::exists).map(Folder::files).orElse(Stream.empty()); - return files.map(File::name).filter(isEncryptedDirectoryName()).map(this::decryptChildFolderName).map(this::folder); - } - - private Predicate isEncryptedDirectoryName() { - return (String name) -> { - if (name.endsWith(DIR_SUFFIX)) { - final Matcher m = cryptor.getFilenameCryptor().encryptedNamePattern().matcher(StringUtils.removeEnd(name, DIR_SUFFIX)); - return m.matches(); - } else { - return false; - } - }; - } - - private String decryptChildFolderName(String encryptedFolderName) { - final byte[] dirId = getDirectoryId().get().getBytes(UTF_8); - final String ciphertext = StringUtils.removeEnd(encryptedFolderName, DIR_SUFFIX); - return cryptor.getFilenameCryptor().decryptFilename(ciphertext, dirId); - } - @Override public CryptoFolder folder(String name) { return folders.get(name); } - public CryptoFolder newFolder(String name) { + private CryptoFile newFile(String name) { + return new CryptoFile(this, name, cryptor); + } + + private CryptoFolder newFolder(String name) { return new CryptoFolder(this, name, cryptor); } + /* ======================= create/move/delete ======================= */ + @Override public void create() { parent.create(); diff --git a/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java b/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java new file mode 100644 index 000000000..73536d7d6 --- /dev/null +++ b/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java @@ -0,0 +1,110 @@ +package org.cryptomator.filesystem.crypto; + +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import java.util.function.UnaryOperator; +import java.util.regex.Pattern; + +import org.apache.commons.codec.binary.Base32; +import org.apache.commons.codec.binary.BaseNCodec; +import org.cryptomator.filesystem.File; +import org.cryptomator.filesystem.Folder; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; + +public class ConflictResolverTest { + + private ConflictResolver conflictResolver; + private Folder folder; + private File canonicalFile; + private File canonicalFolder; + private File conflictingFile; + private File conflictingFolder; + private File resolved; + private File unrelatedFile; + + @Before + public void setup() { + Pattern base32Pattern = Pattern.compile("([A-Z0-9]{8})*[A-Z0-9=]{8}"); + BaseNCodec base32 = new Base32(); + UnaryOperator decode = (s) -> new String(base32.decode(s), StandardCharsets.UTF_8); + UnaryOperator encode = (s) -> base32.encodeAsString(s.getBytes(StandardCharsets.UTF_8)); + conflictResolver = new ConflictResolver(base32Pattern, decode, encode); + + folder = Mockito.mock(Folder.class); + canonicalFile = Mockito.mock(File.class); + canonicalFolder = Mockito.mock(File.class); + conflictingFile = Mockito.mock(File.class); + conflictingFolder = Mockito.mock(File.class); + resolved = Mockito.mock(File.class); + unrelatedFile = Mockito.mock(File.class); + + String canonicalFileName = encode.apply("test name"); + String canonicalFolderName = encode.apply("test name") + Constants.DIR_SUFFIX; + String conflictingFileName = canonicalFileName + " (version 2)"; + String conflictingFolderName = canonicalFolderName + " (version 2)"; + String unrelatedName = "notBa$e32!"; + + Mockito.when(canonicalFile.name()).thenReturn(canonicalFileName); + Mockito.when(canonicalFolder.name()).thenReturn(canonicalFolderName); + Mockito.when(conflictingFile.name()).thenReturn(conflictingFileName); + Mockito.when(conflictingFolder.name()).thenReturn(conflictingFolderName); + Mockito.when(unrelatedFile.name()).thenReturn(unrelatedName); + + Mockito.when(canonicalFile.exists()).thenReturn(true); + Mockito.when(canonicalFolder.exists()).thenReturn(true); + Mockito.when(conflictingFile.exists()).thenReturn(true); + Mockito.when(conflictingFolder.exists()).thenReturn(true); + Mockito.when(unrelatedFile.exists()).thenReturn(true); + + Mockito.doReturn(Optional.of(folder)).when(canonicalFile).parent(); + Mockito.doReturn(Optional.of(folder)).when(canonicalFolder).parent(); + Mockito.doReturn(Optional.of(folder)).when(conflictingFile).parent(); + Mockito.doReturn(Optional.of(folder)).when(conflictingFolder).parent(); + Mockito.doReturn(Optional.of(folder)).when(unrelatedFile).parent(); + + Mockito.when(folder.file(Mockito.startsWith(canonicalFileName.substring(0, 8)))).thenReturn(resolved); + Mockito.when(folder.file(canonicalFileName)).thenReturn(canonicalFile); + Mockito.when(folder.file(canonicalFolderName)).thenReturn(canonicalFolder); + Mockito.when(folder.file(conflictingFileName)).thenReturn(conflictingFile); + Mockito.when(folder.file(conflictingFolderName)).thenReturn(conflictingFolder); + Mockito.when(folder.file(unrelatedName)).thenReturn(unrelatedFile); + } + + @Test + public void testCanonicalName() { + File resolved = conflictResolver.resolveIfNecessary(canonicalFile); + Assert.assertSame(canonicalFile, resolved); + } + + @Test + public void testUnrelatedName() { + File resolved = conflictResolver.resolveIfNecessary(unrelatedFile); + Assert.assertSame(unrelatedFile, resolved); + } + + @Test + public void testConflictingFile() { + File resolved = conflictResolver.resolveIfNecessary(conflictingFile); + Mockito.verify(conflictingFile).moveTo(resolved); + Assert.assertSame(resolved, resolved); + } + + @Test + public void testConflictingFileIfCanonicalDoesnExist() { + Mockito.when(canonicalFile.exists()).thenReturn(false); + File resolved = conflictResolver.resolveIfNecessary(conflictingFile); + Mockito.verify(conflictingFile).moveTo(canonicalFile); + Assert.assertSame(canonicalFile, resolved); + } + + @Test + public void testConflictingFolder() { + File resolved = conflictResolver.resolveIfNecessary(conflictingFolder); + Mockito.verify(conflictingFolder).moveTo(resolved); + Assert.assertSame(resolved, resolved); + } + +} From 1c54e4f4adb92e1da64d17e1feb2fcb8cae4f209 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Thu, 12 May 2016 16:13:03 +0200 Subject: [PATCH 13/16] in the unlikely event of an alternative name already being used, choose a new random conflict id. --- .../filesystem/crypto/ConflictResolver.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java index bfcd8660f..38f321b28 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java @@ -52,11 +52,15 @@ final class ConflictResolver { Folder folder = conflictingFile.parent().get(); File canonicalFile = folder.file(isDirectory ? ciphertext + DIR_SUFFIX : ciphertext); if (canonicalFile.exists()) { - // CONFLICT!!!!!11 - String conflictId = createConflictId(); - String alternativeCleartext = cleartext + " (Conflict " + conflictId + ")"; - String alternativeCiphertext = nameEncryptor.apply(alternativeCleartext); - File alternativeFile = folder.file(isDirectory ? alternativeCiphertext + DIR_SUFFIX : alternativeCiphertext); + // conflict detected! look for an alternative name: + File alternativeFile; + String conflictId; + do { + conflictId = createConflictId(); + String alternativeCleartext = cleartext + " (Conflict " + conflictId + ")"; + String alternativeCiphertext = nameEncryptor.apply(alternativeCleartext); + alternativeFile = folder.file(isDirectory ? alternativeCiphertext + DIR_SUFFIX : alternativeCiphertext); + } while (alternativeFile.exists()); LOG.info("Detected conflict {}:\n{}\n{}", conflictId, canonicalFile, conflictingFile); conflictingFile.moveTo(alternativeFile); return alternativeFile; From d304d66cdd4462d7eacef5f3c6f223f52955572f Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Thu, 12 May 2016 19:23:24 +0200 Subject: [PATCH 14/16] Updated localizations [ci skip] --- .../ui/src/main/resources/localization/de.txt | 7 ++ .../ui/src/main/resources/localization/kr.txt | 5 ++ .../ui/src/main/resources/localization/sk.txt | 3 - .../ui/src/main/resources/localization/tr.txt | 89 +++++++++++++++++++ 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 main/ui/src/main/resources/localization/tr.txt diff --git a/main/ui/src/main/resources/localization/de.txt b/main/ui/src/main/resources/localization/de.txt index d656e86c0..31dc2757c 100644 --- a/main/ui/src/main/resources/localization/de.txt +++ b/main/ui/src/main/resources/localization/de.txt @@ -3,6 +3,8 @@ # See the LICENSE.txt file for more info. # # Contributors: +# Christian Schmickler +# Joscha Feth # Markus Kreusch # Michael Schmetter # Sebastian Wiesendahl @@ -86,3 +88,8 @@ tray.menu.quit = Beenden tray.infoMsg.title = Cryptomator läuft noch tray.infoMsg.msg = Cryptomator läuft noch. Mit dem Tray-Icon beenden. tray.infoMsg.msg.osx = Cryptomator läuft noch. Über die Menüleiste beenden. +initialize.messageLabel.passwordStrength.0 = Sehr schwach +initialize.messageLabel.passwordStrength.1 = Schwach +initialize.messageLabel.passwordStrength.2 = Mittel +initialize.messageLabel.passwordStrength.3 = Stark +initialize.messageLabel.passwordStrength.4 = Sehr stark \ No newline at end of file diff --git a/main/ui/src/main/resources/localization/kr.txt b/main/ui/src/main/resources/localization/kr.txt index 1978f9093..0970719ff 100644 --- a/main/ui/src/main/resources/localization/kr.txt +++ b/main/ui/src/main/resources/localization/kr.txt @@ -82,3 +82,8 @@ tray.menu.quit = 종료 tray.infoMsg.title = 계속 실행 중입니다. tray.infoMsg.msg = Cryptomator가 계속 실행 중입니다. 종료하실려면 트레이 아이콘에서 해주세요. tray.infoMsg.msg.osx = Cryptomator가 계속 실행중입니다. 종료하실려면 메뉴 바 아이콘에서 해주세요. +initialize.messageLabel.passwordStrength.0 = 너무 약함 +initialize.messageLabel.passwordStrength.1 = 약함 +initialize.messageLabel.passwordStrength.2 = 괜찮음 +initialize.messageLabel.passwordStrength.3 = 강력함 +initialize.messageLabel.passwordStrength.4 = 매우 강력함 diff --git a/main/ui/src/main/resources/localization/sk.txt b/main/ui/src/main/resources/localization/sk.txt index 74ef6bf14..371e19b4f 100644 --- a/main/ui/src/main/resources/localization/sk.txt +++ b/main/ui/src/main/resources/localization/sk.txt @@ -6,9 +6,6 @@ # Filip Havrlent # Tatiana Chovancová -# Copyright (c) 2016 The Cryptomator Contributors -# This file is licensed under the terms of the MIT license. -# See the LICENSE.txt file for more info. app.name = Cryptomator # main.fxml main.emptyListInstructions = Pridať trezor diff --git a/main/ui/src/main/resources/localization/tr.txt b/main/ui/src/main/resources/localization/tr.txt new file mode 100644 index 000000000..31918f4df --- /dev/null +++ b/main/ui/src/main/resources/localization/tr.txt @@ -0,0 +1,89 @@ +# Copyright (c) 2016 The Cryptomator Contributors +# This file is licensed under the terms of the MIT license. +# See the LICENSE.txt file for more info. +# +# Contributors: +# Cem KOÇ + +app.name = Cryptomator +# main.fxml +main.emptyListInstructions = Kasa eklemek için tıkla +main.directoryList.contextMenu.remove = Listeden sil +main.directoryList.contextMenu.changePassword = Şifreyi değiştir +main.addDirectory.contextMenu.new = Yeni bir kasa yarat +main.addDirectory.contextMenu.open = Var olan kasayı aç +# welcome.fxml +welcome.checkForUpdates.label.currentlyChecking = Güncellemeler kontrol ediliyor... +welcome.newVersionMessage = Sürüm %s indirilebilir. Şu anki sürüm\: %s +# initialize.fxml +initialize.label.password = Şifre +initialize.label.retypePassword = Şifre (tekrar) +initialize.button.ok = Kasa oluştur +initialize.messageLabel.alreadyInitialized = Kasa çoktan başlatıldı +initialize.messageLabel.initializationFailed = Kasa başlatılamadı. Detaylar için log dosyasına bakın. +# notfound.fxml +notfound.label = Kasa bulunamadı. Yeri değişmiş olabilir mi ? +# upgrade.fxml +upgrade.button = Kasayı yükselt. +upgrade.version3dropBundleExtension.msg = Bu kasanın yeni formata geçirilmesi gerekmekte. "%1$s" ismi "%2$s" olarak değiştirilecek. Devam etmeden önce senkronizasyonun bittiğine emin olun. +upgrade.version3dropBundleExtension.err.alreadyExists = Otomatik format değiştirme sırasında hata. "%s" zaten bulunmakta. +# unlock.fxml +unlock.label.password = Şifre +unlock.label.mountName = Sürücü ismi +unlock.label.winDriveLetter = Sürücü konumu +unlock.label.downloadsPageLink = Tüm Cryptomator sürümleri +unlock.label.advancedHeading = Gelişmiş seçenekler +unlock.button.unlock = Kasayı aç +unlock.button.advancedOptions.show = Daha fazla seçenek +unlock.button.advancedOptions.hide = Daha az seçenek +unlock.choicebox.winDriveLetter.auto = Otomatik ata +unlock.errorMessage.wrongPassword = Yanlış şifre +unlock.errorMessage.mountingFailed = Başlama başarısız. Detaylar için log dosyasına bakın +unlock.errorMessage.unsupportedKeyLengthInstallJCE = Şifre çözme başarısız. Lütfen Oracle JCE Unlimited Strength Policy yükleyin. +unlock.errorMessage.unsupportedVersion.vaultOlderThanSoftware = Desteklenmeyen kasa. Bu kasa daha eski bir Cryptomator sürümü ile oluşturulmuş. +unlock.errorMessage.unsupportedVersion.softwareOlderThanVault = Desteklenmeyen kasa. Bu kasa daha yeni bir Cryptomator sürümü ile oluşturulmuş. +unlock.messageLabel.startServerFailed = WebDAV sunucu başlatma başarısız. +# change_password.fxml +changePassword.label.oldPassword = Eski şifre +changePassword.label.newPassword = Yeni şifre +changePassword.label.retypePassword = Yeni şifre (tekrar) +changePassword.label.downloadsPageLink = Tüm Cryptomator sürümleri +changePassword.button.change = Şifreyi değiştir +changePassword.errorMessage.wrongPassword = Yanlış şifre +changePassword.errorMessage.decryptionFailed = Şifre çözme başarısız +changePassword.errorMessage.unsupportedKeyLengthInstallJCE = Şifre çözme başarısız. Lütfen Oracle JCE Unlimited Strength Policy yükleyin. +changePassword.errorMessage.unsupportedVersion.vaultOlderThanSoftware = Desteklenmeyen kasa. Bu kasa daha eski bir Cryptomator sürümü ile oluşturulmuş. +changePassword.errorMessage.unsupportedVersion.softwareOlderThanVault = Desteklenmeyen kasa. Bu kasa daha yeni bir Cryptomator sürümü ile oluşturulmuş. +changePassword.infoMessage.success = Şifre değiştirildi. +# unlocked.fxml +unlocked.button.lock = Kasayı kilitle +unlocked.moreOptions.reveal = Sürücüyü göster +unlocked.moreOptions.copyUrl = WebDAV URl'sini kopyala +unlocked.label.revealFailed = Komut başarısız +unlocked.label.unmountFailed = Sürücü çıkarma başarısız +unlocked.label.statsEncrypted = şifrelenmiş +unlocked.label.statsDecrypted = şifresi çözülmüş +unlocked.ioGraph.yAxis.label = Veri hacmi (MiB/s) +# mac_warnings.fxml +macWarnings.windowTitle = Tehlike - Bozuk dosya - %s +macWarnings.message = Cryptomator bu satırlarda kötücül olma olasılığına sahip bozulmalar tespit etti\: +macWarnings.moreInformationButton = Daha fazla öğren +macWarnings.whitelistButton = Seçilenleri her halükarda şifrele +# settings.fxml +settings.version.label = Sürüm %s +settings.checkForUpdates.label = Güncellemeleri denetle +settings.port.label = WebDAV Port * +settings.port.prompt = 0 \= Otomatik seç +settings.useipv6.label = IPv6 kullan +settings.requiresRestartLabel = * Cryptomator yeniden başlatılması gerek +# tray icon +tray.menu.open = Aç +tray.menu.quit = Çıkış +tray.infoMsg.title = Hala çalışıyor +tray.infoMsg.msg = Cryptomator hala çalışıyor. Bildirim simgesi ile çıkış yapın. +tray.infoMsg.msg.osx = Cryptomator hala çalışıyor. Menü bar simgesi ile çıkış yapın. +initialize.messageLabel.passwordStrength.0 = Çok zayıf +initialize.messageLabel.passwordStrength.1 = Zayıf +initialize.messageLabel.passwordStrength.2 = İyi +initialize.messageLabel.passwordStrength.3 = Güçlü +initialize.messageLabel.passwordStrength.4 = Çok güçlü \ No newline at end of file From 6fc343ea123fb97e587fac1a4a1300a3011ddcc3 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 May 2016 14:10:37 +0200 Subject: [PATCH 15/16] more fault-tolerant behaviour when mapping of long filenames couldn't be found. --- .../shortening/FilenameShortener.java | 8 +++--- .../shortening/FilenameShortenerTest.java | 6 ++--- .../shortening/ShorteningFileSystemTest.java | 26 +++++++++++++++++++ .../src/test/resources/log4j2.xml | 22 ++++++++++++++++ 4 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 main/filesystem-nameshortening/src/test/resources/log4j2.xml diff --git a/main/filesystem-nameshortening/src/main/java/org/cryptomator/filesystem/shortening/FilenameShortener.java b/main/filesystem-nameshortening/src/main/java/org/cryptomator/filesystem/shortening/FilenameShortener.java index 93443d5ed..557e399eb 100644 --- a/main/filesystem-nameshortening/src/main/java/org/cryptomator/filesystem/shortening/FilenameShortener.java +++ b/main/filesystem-nameshortening/src/main/java/org/cryptomator/filesystem/shortening/FilenameShortener.java @@ -8,8 +8,6 @@ *******************************************************************************/ package org.cryptomator.filesystem.shortening; -import java.io.FileNotFoundException; -import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -19,9 +17,12 @@ import org.apache.commons.codec.binary.BaseNCodec; import org.cryptomator.filesystem.File; import org.cryptomator.filesystem.Folder; import org.cryptomator.io.FileContents; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class FilenameShortener { + private static final Logger LOG = LoggerFactory.getLogger(FilenameShortener.class); private static final String LONG_NAME_FILE_EXT = ".lng"; private static final ThreadLocal SHA1 = new ThreadLocalSha1(); private static final BaseNCodec BASE32 = new Base32(); @@ -71,7 +72,8 @@ class FilenameShortener { private String loadMapping(String shortName) { final File mappingFile = mappingFile(shortName); if (!mappingFile.exists()) { - throw new UncheckedIOException(new FileNotFoundException("Mapping file not found " + mappingFile)); + LOG.warn("Mapping file not found: " + mappingFile); + return shortName; } else { return FileContents.UTF_8.readContents(mappingFile); } diff --git a/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/FilenameShortenerTest.java b/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/FilenameShortenerTest.java index 76d4c5b6b..faab82718 100644 --- a/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/FilenameShortenerTest.java +++ b/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/FilenameShortenerTest.java @@ -8,8 +8,6 @@ *******************************************************************************/ package org.cryptomator.filesystem.shortening; -import java.io.UncheckedIOException; - import org.cryptomator.filesystem.FileSystem; import org.cryptomator.filesystem.inmem.InMemoryFileSystem; import org.junit.Assert; @@ -45,12 +43,12 @@ public class FilenameShortenerTest { Assert.assertEquals("short", shortener.inflate("short")); } - @Test(expected = UncheckedIOException.class) + @Test public void testInflateWithoutMappingFile() { FileSystem fs = new InMemoryFileSystem(); FilenameShortener shortener = new FilenameShortener(fs, 10); - shortener.inflate("iJustMadeThisNameUp.lng"); + Assert.assertEquals("iJustMadeThisNameUp.lng", shortener.inflate("iJustMadeThisNameUp.lng")); } } diff --git a/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/ShorteningFileSystemTest.java b/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/ShorteningFileSystemTest.java index 6506b2b32..b4dad258c 100644 --- a/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/ShorteningFileSystemTest.java +++ b/main/filesystem-nameshortening/src/test/java/org/cryptomator/filesystem/shortening/ShorteningFileSystemTest.java @@ -16,6 +16,7 @@ import static org.junit.Assert.assertThat; import java.io.UncheckedIOException; import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.time.Instant; import java.util.concurrent.TimeoutException; @@ -102,6 +103,31 @@ public class ShorteningFileSystemTest { Assert.assertTrue(correspondingMetadataFile.exists()); } + @Test + public void testInflate() { + final FileSystem underlyingFs = new InMemoryFileSystem(); + final Folder metadataRoot = underlyingFs.folder(METADATA_DIR_NAME); + final FileSystem fs = new ShorteningFileSystem(underlyingFs, METADATA_DIR_NAME, 10); + final File correspondingMetadataFile = metadataRoot.folder("QM").folder("JL").file("QMJL5GQUETRX2YRV6XDTJQ6NNM7IEUHP.lng"); + final Folder shortenedFolder = underlyingFs.folder("QMJL5GQUETRX2YRV6XDTJQ6NNM7IEUHP.lng"); + shortenedFolder.create(); + correspondingMetadataFile.parent().get().create(); + try (WritableFile w = correspondingMetadataFile.openWritable()) { + w.write(ByteBuffer.wrap("morethantenchars".getBytes(StandardCharsets.UTF_8))); + } + Assert.assertTrue(correspondingMetadataFile.exists()); + Assert.assertTrue(fs.folders().map(Folder::name).anyMatch(n -> n.equals("morethantenchars"))); + } + + @Test + public void testInflateFailedDueToMissingMapping() { + final FileSystem underlyingFs = new InMemoryFileSystem(); + final FileSystem fs = new ShorteningFileSystem(underlyingFs, METADATA_DIR_NAME, 10); + final Folder shortenedFolder = underlyingFs.folder("QMJL5GQUETRX2YRV6XDTJQ6NNM7IEUHP.lng"); + shortenedFolder.create(); + Assert.assertTrue(fs.folders().map(Folder::name).anyMatch(n -> n.equals("QMJL5GQUETRX2YRV6XDTJQ6NNM7IEUHP.lng"))); + } + @Test public void testMoveLongFolders() { final FileSystem underlyingFs = new InMemoryFileSystem(); diff --git a/main/filesystem-nameshortening/src/test/resources/log4j2.xml b/main/filesystem-nameshortening/src/test/resources/log4j2.xml new file mode 100644 index 000000000..9b4889392 --- /dev/null +++ b/main/filesystem-nameshortening/src/test/resources/log4j2.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + From 6c1810366240c8c2200744b0934635e0cea977e5 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 May 2016 18:59:06 +0200 Subject: [PATCH 16/16] Remove files with non-decryptable names from dir listings --- .../filesystem/crypto/ConflictResolver.java | 20 ++++++------ .../filesystem/crypto/CryptoFile.java | 6 +--- .../filesystem/crypto/CryptoFolder.java | 31 ++++++++++++------- .../crypto/ConflictResolverTest.java | 10 +++--- 4 files changed, 36 insertions(+), 31 deletions(-) diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java index 38f321b28..4f9f9f7c7 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/ConflictResolver.java @@ -2,14 +2,14 @@ package org.cryptomator.filesystem.crypto; import static org.cryptomator.filesystem.crypto.Constants.DIR_SUFFIX; +import java.util.Optional; import java.util.UUID; -import java.util.function.UnaryOperator; +import java.util.function.Function; import java.util.regex.MatchResult; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; -import org.cryptomator.crypto.engine.CryptoException; import org.cryptomator.filesystem.File; import org.cryptomator.filesystem.Folder; import org.slf4j.Logger; @@ -21,10 +21,10 @@ final class ConflictResolver { private static final int UUID_FIRST_GROUP_STRLEN = 8; private final Pattern encryptedNamePattern; - private final UnaryOperator nameDecryptor; - private final UnaryOperator nameEncryptor; + private final Function> nameDecryptor; + private final Function> nameEncryptor; - public ConflictResolver(Pattern encryptedNamePattern, UnaryOperator nameDecryptor, UnaryOperator nameEncryptor) { + public ConflictResolver(Pattern encryptedNamePattern, Function> nameDecryptor, Function> nameEncryptor) { this.encryptedNamePattern = encryptedNamePattern; this.nameDecryptor = nameDecryptor; this.nameEncryptor = nameEncryptor; @@ -47,8 +47,8 @@ final class ConflictResolver { private File resolveConflict(File conflictingFile, MatchResult matchResult) { String ciphertext = matchResult.group(); boolean isDirectory = conflictingFile.name().substring(matchResult.end()).startsWith(DIR_SUFFIX); - try { - String cleartext = nameDecryptor.apply(ciphertext); + Optional cleartext = nameDecryptor.apply(ciphertext); + if (cleartext.isPresent()) { Folder folder = conflictingFile.parent().get(); File canonicalFile = folder.file(isDirectory ? ciphertext + DIR_SUFFIX : ciphertext); if (canonicalFile.exists()) { @@ -57,8 +57,8 @@ final class ConflictResolver { String conflictId; do { conflictId = createConflictId(); - String alternativeCleartext = cleartext + " (Conflict " + conflictId + ")"; - String alternativeCiphertext = nameEncryptor.apply(alternativeCleartext); + String alternativeCleartext = cleartext.get() + " (Conflict " + conflictId + ")"; + String alternativeCiphertext = nameEncryptor.apply(alternativeCleartext).get(); alternativeFile = folder.file(isDirectory ? alternativeCiphertext + DIR_SUFFIX : alternativeCiphertext); } while (alternativeFile.exists()); LOG.info("Detected conflict {}:\n{}\n{}", conflictId, canonicalFile, conflictingFile); @@ -68,7 +68,7 @@ final class ConflictResolver { conflictingFile.moveTo(canonicalFile); return canonicalFile; } - } catch (CryptoException e) { + } else { // not decryptable; false positive return conflictingFile; } diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFile.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFile.java index 3f65e845c..ff0df04e7 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFile.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFile.java @@ -8,8 +8,6 @@ *******************************************************************************/ package org.cryptomator.filesystem.crypto; -import static java.nio.charset.StandardCharsets.UTF_8; - import java.io.UncheckedIOException; import java.nio.file.FileAlreadyExistsException; import java.util.Optional; @@ -27,9 +25,7 @@ class CryptoFile extends CryptoNode implements File { @Override protected Optional encryptedName() { - return parent().get().getDirectoryId().map(s -> s.getBytes(UTF_8)).map(parentDirId -> { - return cryptor.getFilenameCryptor().encryptFilename(name(), parentDirId); - }); + return parent().get().encryptChildName(name()); } @Override diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java index 39220e6af..f83b1087f 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoFolder.java @@ -25,15 +25,19 @@ import org.apache.commons.lang3.StringUtils; import org.cryptomator.common.LazyInitializer; import org.cryptomator.common.WeakValuedCache; import org.cryptomator.common.streams.AutoClosingStream; +import org.cryptomator.crypto.engine.CryptoException; import org.cryptomator.crypto.engine.Cryptor; import org.cryptomator.filesystem.Deleter; import org.cryptomator.filesystem.File; import org.cryptomator.filesystem.Folder; import org.cryptomator.filesystem.Node; import org.cryptomator.io.FileContents; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class CryptoFolder extends CryptoNode implements Folder { + private static final Logger LOG = LoggerFactory.getLogger(CryptoFolder.class); private final WeakValuedCache folders = WeakValuedCache.usingLoader(this::newFolder); private final WeakValuedCache files = WeakValuedCache.usingLoader(this::newFile); private final AtomicReference directoryId = new AtomicReference<>(); @@ -49,9 +53,7 @@ class CryptoFolder extends CryptoNode implements Folder { @Override protected Optional encryptedName() { if (parent().isPresent()) { - return parent().get().getDirectoryId().map(s -> s.getBytes(UTF_8)).map(parentDirId -> { - return cryptor.getFilenameCryptor().encryptFilename(name(), parentDirId) + DIR_SUFFIX; - }); + return parent().get().encryptChildName(name()).map(s -> s + DIR_SUFFIX); } else { return Optional.of(cryptor.getFilenameCryptor().encryptFilename(name()) + DIR_SUFFIX); } @@ -95,24 +97,31 @@ class CryptoFolder extends CryptoNode implements Folder { return (File file) -> encryptedNamePattern.matcher(file.name()).find(); } - private String decryptChildName(String ciphertextFileName) { - final byte[] dirId = getDirectoryId().get().getBytes(UTF_8); - return cryptor.getFilenameCryptor().decryptFilename(ciphertextFileName, dirId); + Optional decryptChildName(String ciphertextFileName) { + return getDirectoryId().map(s -> s.getBytes(UTF_8)).map(dirId -> { + try { + return cryptor.getFilenameCryptor().decryptFilename(ciphertextFileName, dirId); + } catch (CryptoException e) { + LOG.warn("Filename decryption of {} failed: {}", ciphertextFileName, e.getMessage()); + return null; + } + }); } - private String encryptChildName(String cleartextFileName) { - final byte[] dirId = getDirectoryId().get().getBytes(UTF_8); - return cryptor.getFilenameCryptor().encryptFilename(cleartextFileName, dirId); + Optional encryptChildName(String cleartextFileName) { + return getDirectoryId().map(s -> s.getBytes(UTF_8)).map(dirId -> { + return cryptor.getFilenameCryptor().encryptFilename(cleartextFileName, dirId); + }); } @Override public Stream files() { - return nonConflictingFiles().map(File::name).filter(endsWithDirSuffix().negate()).map(this::decryptChildName).map(this::file); + return nonConflictingFiles().map(File::name).filter(endsWithDirSuffix().negate()).map(this::decryptChildName).filter(Optional::isPresent).map(Optional::get).map(this::file); } @Override public Stream folders() { - return nonConflictingFiles().map(File::name).filter(endsWithDirSuffix()).map(this::removeDirSuffix).map(this::decryptChildName).map(this::folder); + return nonConflictingFiles().map(File::name).filter(endsWithDirSuffix()).map(this::removeDirSuffix).map(this::decryptChildName).filter(Optional::isPresent).map(Optional::get).map(this::folder); } private Predicate endsWithDirSuffix() { diff --git a/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java b/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java index 73536d7d6..10f8a4638 100644 --- a/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java +++ b/main/filesystem-crypto/src/test/java/org/cryptomator/filesystem/crypto/ConflictResolverTest.java @@ -2,7 +2,7 @@ package org.cryptomator.filesystem.crypto; import java.nio.charset.StandardCharsets; import java.util.Optional; -import java.util.function.UnaryOperator; +import java.util.function.Function; import java.util.regex.Pattern; import org.apache.commons.codec.binary.Base32; @@ -29,8 +29,8 @@ public class ConflictResolverTest { public void setup() { Pattern base32Pattern = Pattern.compile("([A-Z0-9]{8})*[A-Z0-9=]{8}"); BaseNCodec base32 = new Base32(); - UnaryOperator decode = (s) -> new String(base32.decode(s), StandardCharsets.UTF_8); - UnaryOperator encode = (s) -> base32.encodeAsString(s.getBytes(StandardCharsets.UTF_8)); + Function> decode = (s) -> Optional.of(new String(base32.decode(s), StandardCharsets.UTF_8)); + Function> encode = (s) -> Optional.of(base32.encodeAsString(s.getBytes(StandardCharsets.UTF_8))); conflictResolver = new ConflictResolver(base32Pattern, decode, encode); folder = Mockito.mock(Folder.class); @@ -41,8 +41,8 @@ public class ConflictResolverTest { resolved = Mockito.mock(File.class); unrelatedFile = Mockito.mock(File.class); - String canonicalFileName = encode.apply("test name"); - String canonicalFolderName = encode.apply("test name") + Constants.DIR_SUFFIX; + String canonicalFileName = encode.apply("test name").get(); + String canonicalFolderName = canonicalFileName + Constants.DIR_SUFFIX; String conflictingFileName = canonicalFileName + " (version 2)"; String conflictingFolderName = canonicalFolderName + " (version 2)"; String unrelatedName = "notBa$e32!";