fix(notifications): clamp size param to max 100 on GET /api/notifications
NullX Finding 2: unbounded size param allowed full table scan. Added spring-boot-starter-validation, @Validated on the controller, @Min(1) @Max(100) on the size param, and ConstraintViolationException → 400 in GlobalExceptionHandler. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,10 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user