mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 22:58:08 +01:00
Fix key transparency monitor request position validation
This commit is contained in:
@@ -14,6 +14,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import java.util.Optional;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import org.whispersystems.textsecuregcm.identity.AciServiceIdentifier;
|
||||
import org.whispersystems.textsecuregcm.util.ByteArrayAdapter;
|
||||
import org.whispersystems.textsecuregcm.util.ByteArrayBase64UrlAdapter;
|
||||
@@ -49,7 +50,7 @@ public record KeyTransparencyMonitorRequest(
|
||||
AciServiceIdentifier value,
|
||||
|
||||
@Schema(description = "A log tree position maintained by the client for the aci.")
|
||||
@Positive
|
||||
@PositiveOrZero
|
||||
long entryPosition,
|
||||
|
||||
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
||||
@@ -66,7 +67,7 @@ public record KeyTransparencyMonitorRequest(
|
||||
String value,
|
||||
|
||||
@Schema(description = "A log tree position maintained by the client for the e164.")
|
||||
@Positive
|
||||
@PositiveOrZero
|
||||
long entryPosition,
|
||||
|
||||
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
||||
@@ -87,7 +88,7 @@ public record KeyTransparencyMonitorRequest(
|
||||
byte[] value,
|
||||
|
||||
@Schema(description = "A log tree position maintained by the client for the username hash.")
|
||||
@Positive
|
||||
@PositiveOrZero
|
||||
long entryPosition,
|
||||
|
||||
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
||||
|
||||
Reference in New Issue
Block a user