limit prekey uploads to 100

This commit is contained in:
Jonathan Klabunde Tomer
2025-04-24 14:41:56 -07:00
committed by Chris Eager
parent d2ad003891
commit 63c79173b2
2 changed files with 43 additions and 0 deletions

View File

@@ -5,11 +5,13 @@
package org.whispersystems.textsecuregcm.entities;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import jakarta.validation.Valid;
import java.util.List;
public record SetKeysRequest(
@Valid
@Size(max=100)
@Schema(description = """
A list of unsigned elliptic-curve prekeys to use for this device. If present and not empty, replaces all stored
unsigned EC prekeys for the device; if absent or empty, any stored unsigned EC prekeys for the device are not
@@ -26,6 +28,7 @@ public record SetKeysRequest(
ECSignedPreKey signedPreKey,
@Valid
@Size(max=100)
@Schema(description = """
A list of signed post-quantum one-time prekeys to use for this device. Each key must have a valid signature from
the identity key in this request. If present and not empty, replaces all stored unsigned PQ prekeys for the