Skip to content

Commit d97d8e1

Browse files
committed
Fix more errors & remove security constraints that are not needed anymore
1 parent 8b2d37b commit d97d8e1

File tree

5 files changed

+4
-57
lines changed

5 files changed

+4
-57
lines changed

build.gradle

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ plugins {
33
alias(libs.plugins.nexus.publish)
44
}
55

6-
ext['spring-framework.version'] = '6.2.11'
7-
ext['tomcat.version'] = '11.0.12'
8-
ext['netty.version'] = '4.2.6.Final' // Due to security vulnerabilities in 4.125.Final and older
9-
106
apply from: "${rootDir}/gradle/publish-root.gradle"
117

128
allprojects {
@@ -68,31 +64,6 @@ subprojects {
6864
annotationProcessor(libs.lombok)
6965
testCompileOnly(libs.lombok)
7066
testAnnotationProcessor(libs.lombok)
71-
72-
// Security constraints
73-
constraints {
74-
implementation("org.springframework:spring-web:6.2.12") {
75-
because("versions below 6.2.11 have security vulnerabilities including CVE-2024-38820 and CVE-2025-41249 - see dependabot #12, #24")
76-
}
77-
implementation("org.springframework:spring-webmvc:6.2.12") {
78-
because("versions below 6.2.11 have security vulnerabilities including CVE-2025-41242 and CVE-2025-41249 - see dependabot #24, #247")
79-
}
80-
implementation("org.apache.tomcat.embed:tomcat-embed-core:11.0.14") {
81-
because("versions below 11.0.12 have security vulnerabilities including CVE-2024-56337, CVE-2025-55754, CVE-2025-61795 - see dependabot #13, #27, #28")
82-
}
83-
implementation("org.apache.commons:commons-lang3:3.20.0") {
84-
because("versions below 3.18.0 have security vulnerabilities including CVE-2025-48924 - see dependabot #15")
85-
}
86-
implementation("io.projectreactor.netty:reactor-netty-http:1.3.0") {
87-
because("versions below 1.2.8 have security vulnerabilities including CVE-2025-22227 - see dependabot #16")
88-
}
89-
implementation("io.netty:netty-codec-http2:4.2.7.Final") {
90-
because("versions below 4.1.124.Final have security vulnerabilities including CVE-2025-55163 - see dependabot #17")
91-
}
92-
implementation("io.netty:netty-codec:4.2.7.Final") {
93-
because("versions below 4.1.125.Final have security vulnerabilities including CVE-2025-58057 - see dependabot #21")
94-
}
95-
}
9667
}
9768

9869
checkstyle {

examples/example-spring-boot-starter-web/build.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ plugins {
55
alias(libs.plugins.openapi.generator)
66
}
77

8-
// Needed for security. See:
9-
// - https://github.com/getyourguide/openapi-validation-java/security/dependabot/25
10-
// - https://github.com/getyourguide/openapi-validation-java/security/dependabot/7
11-
// - https://github.com/getyourguide/openapi-validation-java/security/dependabot/6
12-
// Hopefully with spring-boot 3.4.2+ this won't be needed anymore and can be removed.
13-
dependencyManagement {
14-
dependencies {
15-
dependency 'ch.qos.logback:logback-core:1.5.21'
16-
dependency 'ch.qos.logback:logback-classic:1.5.21'
17-
}
18-
}
19-
208
dependencies {
219
implementation project(':examples:examples-common')
2210
implementation project(':spring-boot-starter:spring-boot-starter-web')

examples/example-spring-boot-starter-webflux/build.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ plugins {
55
alias(libs.plugins.openapi.generator)
66
}
77

8-
// Needed for security. See:
9-
// - https://github.com/getyourguide/openapi-validation-java/security/dependabot/25
10-
// - https://github.com/getyourguide/openapi-validation-java/security/dependabot/7
11-
// - https://github.com/getyourguide/openapi-validation-java/security/dependabot/6
12-
// Hopefully with spring-boot 3.4.2+ this won't be needed anymore and can be removed.
13-
dependencyManagement {
14-
dependencies {
15-
dependency 'ch.qos.logback:logback-core:1.5.21'
16-
dependency 'ch.qos.logback:logback-classic:1.5.21'
17-
}
18-
}
19-
208
dependencies {
219
implementation project(':examples:examples-common')
2210
implementation project(':spring-boot-starter:spring-boot-starter-webflux')

examples/example-spring-boot-starter-webflux/src/main/java/com/getyourguide/openapi/validation/example/error/GlobalErrorWebExceptionHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import com.getyourguide.openapi.validation.example.openapi.model.BadRequestResponse;
44
import java.util.Optional;
55
import org.springframework.boot.autoconfigure.web.WebProperties;
6-
import org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler;
76
import org.springframework.boot.web.error.ErrorAttributeOptions;
8-
import org.springframework.boot.web.reactive.error.ErrorAttributes;
7+
import org.springframework.boot.webflux.autoconfigure.error.AbstractErrorWebExceptionHandler;
8+
import org.springframework.boot.webflux.error.ErrorAttributes;
99
import org.springframework.context.ApplicationContext;
1010
import org.springframework.core.annotation.Order;
1111
import org.springframework.http.HttpStatus;

spring-boot-starter/spring-boot-starter-webflux/src/main/java/com/getyourguide/openapi/validation/filter/OpenApiValidationWebFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ private Mono<AlreadyDidValidation> optionalValidateRequestWithFailOnViolation(
8484
AlreadyDidValidation alreadyDidValidation
8585
) {
8686
if (!trafficSelector.shouldFailOnRequestViolation(requestMetaData)
87-
|| !request.getHeaders().containsKey("Content-Type")
88-
|| !request.getHeaders().containsKey("Content-Length")) {
87+
|| !request.getHeaders().containsHeader("Content-Type")
88+
|| !request.getHeaders().containsHeader("Content-Length")) {
8989
return Mono.just(alreadyDidValidation);
9090
}
9191

0 commit comments

Comments
 (0)