From f16b8a4ddb498b0ec0e2ac4c72e98d7c710d1de3 Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Thu, 13 Nov 2025 11:44:42 -0800 Subject: [PATCH 1/7] Changelog for 4.11.0 --- CHANGELOG.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdcfc0919..024cfb9b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Whenever a 3rd party library is updated, S3Mock will update it's MINOR version. * [PLANNED - 5.x - RELEASE TBD](#planned---5x---release-tbd) * [Planned changes](#planned-changes) * [CURRENT - 4.x - THIS VERSION IS UNDER ACTIVE DEVELOPMENT](#current---4x---this-version-is-under-active-development) - * [4.11.0 - PLANNED](#4110---planned) + * [4.11.0](#4110) * [4.10.0](#4100) * [4.9.1](#491) * [4.9.0](#490) @@ -152,21 +152,28 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav **The current major version 4 will receive new features, dependency updates and bug fixes on a continuous basis. We usually follow the Spring Boot release cycle.** -## 4.11.0 - PLANNED +## 4.11.0 Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Java integration. -**This is currently the last planned minor release of 4.x.** +**This is the last planned minor release of 4.x.** * Features and fixes - * TBD + * Support quiet parameter in DeleteObjects (fixes #2756) * Refactorings * TBD * Version updates (deliverable dependencies) + * Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0 * Update to Spring Boot 3.5.8 * Planned release November 20th 2025 * https://github.com/spring-projects/spring-boot/milestone/401 * Version updates (build dependencies) - * TBD + * Bump io.fabric8:docker-maven-plugin from 0.47.0 to 0.48.0 + * Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0 + * Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0 + * Bump actions/dependency-review-action from 4.8.1 to 4.8.2 + * Bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2 + * Bump actions/checkout from 5.0.0 to 5.0.1 + * Bump github/codeql-action from 4.31.2 to 4.31.3 ## 4.10.0 Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Java integration. From 2a5ca9241aa4f902d9dd78d4ee0db61d79990fdc Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Fri, 21 Nov 2025 12:56:35 +0100 Subject: [PATCH 2/7] Bump Spring Boot from 3.5.7 to 3.5.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2e953eae4..39920982f 100644 --- a/pom.xml +++ b/pom.xml @@ -129,7 +129,7 @@ false 4.0.0 - 3.5.7 + 3.5.8 1.21.3 7.11.0 2.11.0 From cc1920d9dcaf9b17748332aa8e64f5c5f1f634c2 Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Fri, 21 Nov 2025 08:38:28 +0100 Subject: [PATCH 3/7] Bump Maven Wrapper to 3.3.4 --- .mvn/wrapper/maven-wrapper.properties | 1 + CHANGELOG.md | 1 + mvnw | 2 +- mvnw.cmd | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 44f3cf2c1..c0bcafe98 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,3 @@ +wrapperVersion=3.3.4 distributionType=only-script distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip diff --git a/CHANGELOG.md b/CHANGELOG.md index 024cfb9b6..ec60e6cd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -174,6 +174,7 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav * Bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2 * Bump actions/checkout from 5.0.0 to 5.0.1 * Bump github/codeql-action from 4.31.2 to 4.31.3 + * Bump maven wrapper from 3.3.3 to 3.3.4 ## 4.10.0 Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Java integration. diff --git a/mvnw b/mvnw index e9cf8d330..bd8896bf2 100755 --- a/mvnw +++ b/mvnw @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.3 +# Apache Maven Wrapper startup batch script, version 3.3.4 # # Optional ENV vars # ----------------- diff --git a/mvnw.cmd b/mvnw.cmd index 2e2dbe039..92450f932 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -19,7 +19,7 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.3 +@REM Apache Maven Wrapper startup batch script, version 3.3.4 @REM @REM Optional ENV vars @REM MVNW_REPOURL - repo url base for downloading maven distribution From c5e2170904607187baac2c42d73852ab518ee6b0 Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Fri, 21 Nov 2025 13:00:22 +0100 Subject: [PATCH 4/7] Bump spring-boot.version from 3.5.7 to 3.5.8 --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec60e6cd8..138e4573a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -162,10 +162,8 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav * Refactorings * TBD * Version updates (deliverable dependencies) + * Bump spring-boot.version from 3.5.7 to 3.5.8 * Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0 - * Update to Spring Boot 3.5.8 - * Planned release November 20th 2025 - * https://github.com/spring-projects/spring-boot/milestone/401 * Version updates (build dependencies) * Bump io.fabric8:docker-maven-plugin from 0.47.0 to 0.48.0 * Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0 From e9e609183a82dec957f10c0a94101f76c3c2a4ee Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Fri, 21 Nov 2025 15:36:35 +0100 Subject: [PATCH 5/7] Validate that keys containing path segments work #2788 --- .../s3mock/its/GetPutDeleteObjectIT.kt | 40 ++++++++++++++ .../testing/s3mock/ObjectControllerTest.kt | 53 +++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt b/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt index 4e7e1f3f3..31f447974 100644 --- a/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt +++ b/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt @@ -97,6 +97,46 @@ internal class GetPutDeleteObjectIT : S3TestBase() { }.isInstanceOf(NoSuchKeyException::class.java) } + @Test + @S3VerifiedSuccess(year = 2025) + fun testPutGetHeadDeleteObject_pathSegments(testInfo: TestInfo) { + val key = "/.././$UPLOAD_FILE_NAME" + val bucketName = givenBucket(testInfo) + + s3Client.putObject( + { + it.bucket(bucketName) + it.key(key) + }, + RequestBody.fromFile(UPLOAD_FILE), + ) + + s3Client.headObject { + it.bucket(bucketName) + it.key(key) + } + + s3Client + .getObject { + it.bucket(bucketName) + it.key(key) + }.use { + assertThat(it.response().contentLength()).isEqualTo(UPLOAD_FILE_LENGTH) + } + + s3Client.deleteObject { + it.bucket(bucketName) + it.key(key) + } + + assertThatThrownBy { + s3Client.getObject { + it.bucket(bucketName) + it.key(key) + } + }.isInstanceOf(NoSuchKeyException::class.java) + } + @Test @S3VerifiedSuccess(year = 2025) fun testPutGetHeadDeleteObjects(testInfo: TestInfo) { diff --git a/server/src/test/kotlin/com/adobe/testing/s3mock/ObjectControllerTest.kt b/server/src/test/kotlin/com/adobe/testing/s3mock/ObjectControllerTest.kt index fed00d072..72681128c 100644 --- a/server/src/test/kotlin/com/adobe/testing/s3mock/ObjectControllerTest.kt +++ b/server/src/test/kotlin/com/adobe/testing/s3mock/ObjectControllerTest.kt @@ -146,6 +146,59 @@ internal class ObjectControllerTest : BaseControllerTest() { } + @Test + @Throws(Exception::class) + fun testPutObject_withPathsegments_Ok() { + givenBucket() + val key = ".././sampleFile.txt" + + val testFile = File(UPLOAD_FILE_NAME) + val digest = DigestUtil.hexDigest(Files.newInputStream(testFile.toPath())) + val tempFile = Files.createTempFile("testPutObject_Ok", "").also { + testFile.copyTo(it.toFile(), overwrite = true) + } + whenever( + objectService.toTempFile( + any( + InputStream::class.java + ), any(HttpHeaders::class.java) + ) + ) + .thenReturn( + FileChecksum( + tempFile, + DigestUtil.checksumFor(testFile.toPath(), DefaultChecksumAlgorithm.CRC32) + ) + ) + + whenever( + objectService.putS3Object( + eq(TEST_BUCKET_NAME), + eq(key), + contains(MediaType.TEXT_PLAIN_VALUE), + anyMap(), + any(Path::class.java), + anyMap(), + anyMap(), + isNull(), + isNull(), + isNull(), + eq(Owner.DEFAULT_OWNER), + eq(StorageClass.STANDARD) + ) + ).thenReturn(s3ObjectMetadata(key, digest)) + + mockMvc.perform( + put("/test-bucket/$key") + .content(testFile.readBytes()) + .contentType(MediaType.TEXT_PLAIN) + .accept(MediaType.APPLICATION_XML) + ) + .andExpect(status().isOk) + .andExpect(header().string(HttpHeaders.ETAG, "\"$digest\"")) + } + + @Test @Throws(Exception::class) fun testPutObject_Options() { From ef74d2fffb1691003a8134de2af1d1be47ec6413 Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Fri, 21 Nov 2025 15:37:14 +0100 Subject: [PATCH 6/7] Validate that range requests against 0 byte uploads fail #2789 --- .../s3mock/its/GetPutDeleteObjectIT.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt b/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt index 31f447974..db31228b5 100644 --- a/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt +++ b/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt @@ -1599,6 +1599,29 @@ internal class GetPutDeleteObjectIT : S3TestBase() { } } + @Test + @S3VerifiedSuccess(year = 2025) + fun testGetObject_rangeDownloads_fail_emptyObject(testInfo: TestInfo) { + val bucketName = givenBucket(testInfo) + s3Client.putObject( + { + it.bucket(bucketName) + it.key(UPLOAD_FILE_NAME) + }, + RequestBody.fromBytes(ByteArray(0)), + ) + val smallRequestEndBytes = 2L + + assertThatThrownBy { + s3Client.getObject { + it.bucket(bucketName) + it.key(UPLOAD_FILE_NAME) + it.range("bytes=-$smallRequestEndBytes") + } + }.isInstanceOf(S3Exception::class.java) + .hasMessageContaining("Service: S3, Status Code: 416") + } + @Test @S3VerifiedSuccess(year = 2025) fun testGetObject_rangeDownloads_finalBytes_prefixOffset(testInfo: TestInfo) { From b1b64e023cad4d33a9bed2f38a340530794eff74 Mon Sep 17 00:00:00 2001 From: Arne Franken Date: Fri, 21 Nov 2025 16:25:31 +0100 Subject: [PATCH 7/7] Prepare for 4.11.0 --- CHANGELOG.md | 4 ++-- docker/pom.xml | 2 +- integration-tests/pom.xml | 2 +- pom.xml | 2 +- server/pom.xml | 2 +- testsupport/common/pom.xml | 2 +- testsupport/junit4/pom.xml | 2 +- testsupport/junit5/pom.xml | 2 +- testsupport/pom.xml | 2 +- testsupport/testcontainers/pom.xml | 2 +- testsupport/testng/pom.xml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 138e4573a..31b9ad385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,8 +170,8 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav * Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0 * Bump actions/dependency-review-action from 4.8.1 to 4.8.2 * Bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2 - * Bump actions/checkout from 5.0.0 to 5.0.1 - * Bump github/codeql-action from 4.31.2 to 4.31.3 + * Bump actions/checkout from 5.0.0 to 6.0.0 + * Bump github/codeql-action from 4.31.2 to 4.31.4 * Bump maven wrapper from 3.3.3 to 3.3.4 ## 4.10.0 diff --git a/docker/pom.xml b/docker/pom.xml index 67926cd68..67b539747 100644 --- a/docker/pom.xml +++ b/docker/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-parent - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-docker diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 4c0c96f19..af23c66cb 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-parent - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-integration-tests diff --git a/pom.xml b/pom.xml index 39920982f..79618f2b8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.adobe.testing s3mock-parent - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT pom S3Mock - Parent diff --git a/server/pom.xml b/server/pom.xml index 40426456d..96cacb8c7 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-parent - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock diff --git a/testsupport/common/pom.xml b/testsupport/common/pom.xml index 81269ea6a..7b7c082d5 100644 --- a/testsupport/common/pom.xml +++ b/testsupport/common/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-testsupport-reactor - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-testsupport-common diff --git a/testsupport/junit4/pom.xml b/testsupport/junit4/pom.xml index c1d884ef4..3fc3620a0 100644 --- a/testsupport/junit4/pom.xml +++ b/testsupport/junit4/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-testsupport-reactor - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-junit4 diff --git a/testsupport/junit5/pom.xml b/testsupport/junit5/pom.xml index b894bfe10..bfcb5b3d3 100644 --- a/testsupport/junit5/pom.xml +++ b/testsupport/junit5/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-testsupport-reactor - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-junit5 diff --git a/testsupport/pom.xml b/testsupport/pom.xml index bbb9cbb54..1a4115cb0 100644 --- a/testsupport/pom.xml +++ b/testsupport/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-parent - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-testsupport-reactor diff --git a/testsupport/testcontainers/pom.xml b/testsupport/testcontainers/pom.xml index 8a0a1f2fb..0e525e763 100644 --- a/testsupport/testcontainers/pom.xml +++ b/testsupport/testcontainers/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-testsupport-reactor - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-testcontainers diff --git a/testsupport/testng/pom.xml b/testsupport/testng/pom.xml index b92fae89a..64e2de769 100644 --- a/testsupport/testng/pom.xml +++ b/testsupport/testng/pom.xml @@ -22,7 +22,7 @@ com.adobe.testing s3mock-testsupport-reactor - 4.10.1-SNAPSHOT + 4.11.0-SNAPSHOT s3mock-testng