Skip to content

Commit

Permalink
Add valid base64 check for revocation baches (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
f11h committed May 20, 2022
1 parent 67b32f7 commit b3aacdd
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.time.ZonedDateTime;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down Expand Up @@ -63,6 +64,7 @@ public class RevocationBatchDto {
public static class BatchEntryDto {

@Schema(description = "Base64 encoded first 128 Bits of the hash of the Entry")
@Pattern(regexp = "^[A-Za-z0-9+/]{22}==$") // Pattern for Base64 String representing exactly 16 bytes
@Length(min = 24, max = 24)
private String hash;

Expand Down
Loading

0 comments on commit b3aacdd

Please sign in to comment.