From 7044989c5a3e6bf1216f3bbed01eb17efb8c337b Mon Sep 17 00:00:00 2001 From: frcroth Date: Fri, 2 Jun 2023 17:24:36 +0200 Subject: [PATCH 1/2] Fix decompression of garbage data after valid gzip data causing decompression to fail --- .../webknossos/datastore/datareaders/Compressor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/Compressor.scala b/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/Compressor.scala index 020d876a077..92bd734b991 100644 --- a/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/Compressor.scala +++ b/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/Compressor.scala @@ -162,7 +162,7 @@ class GzipCompressor(val properties: Map[String, CompressionSetting]) extends Co override def decompress(input: Array[Byte]): Array[Byte] = { val is = new ByteArrayInputStream(input) val os = new ByteArrayOutputStream() - val iis = new GzipCompressorInputStream(is, true) + val iis = new GzipCompressorInputStream(is, false) try passThrough(iis, os) finally if (iis != null) iis.close() os.toByteArray From 52541ebe05f605fd97e04fb1416db914246cad66 Mon Sep 17 00:00:00 2001 From: frcroth Date: Mon, 5 Jun 2023 09:24:03 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 38adf08bbde..4acb4d6f2d7 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -17,6 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released ### Fixed - Fixed a bug where some volume annotations could not be downloaded. [#7115](https://github.com/scalableminds/webknossos/pull/7115) +- Fixed reading of some remote datasets where invalid data would follow valid gzip data, causing the decompression to fail. [#7119](https://github.com/scalableminds/webknossos/pull/7119) ### Removed - Support for [webknososs-connect](https://github.com/scalableminds/webknossos-connect) data store servers has been removed. Use the "Add Remote Dataset" functionality instead. [#7031](https://github.com/scalableminds/webknossos/pull/7031)