diff --git a/service/src/main/proto/org/signal/chat/profile.proto b/service/src/main/proto/org/signal/chat/profile.proto index bc5f1a5ed..d14397687 100644 --- a/service/src/main/proto/org/signal/chat/profile.proto +++ b/service/src/main/proto/org/signal/chat/profile.proto @@ -120,8 +120,10 @@ message SetProfileRequest { bytes version = 1 [(require.exactlySize) = 32]; // The ciphertext of a serialized Profile protobuf. Required. - // 937 max length = 909 plaintext serialization + 28 bytes encryption overhead - bytes data = 2 [(require.nonEmpty) = true, (require.size).max = 937]; + // 1486 max length = 1202 plaintext serialization + // + 256-byte external padding PKCS#7 + // + 28 bytes encryption overhead + bytes data = 2 [(require.nonEmpty) = true, (require.size).max = 1486]; // The SHA-256 hash of the Profile ciphertext being replaced. // This is used an optimistic lock against concurrent changes. diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java index 35cf8dc2a..1dfc55708 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java @@ -98,6 +98,7 @@ import org.whispersystems.textsecuregcm.entities.BadgeSvg; import org.whispersystems.textsecuregcm.identity.AciServiceIdentifier; import org.whispersystems.textsecuregcm.limits.RateLimiter; import org.whispersystems.textsecuregcm.limits.RateLimiters; +import org.whispersystems.textsecuregcm.purchases.ReceiptLevel; import org.whispersystems.textsecuregcm.s3.PostPolicyGenerator; import org.whispersystems.textsecuregcm.storage.Account; import org.whispersystems.textsecuregcm.storage.AccountBadge; @@ -108,7 +109,6 @@ import org.whispersystems.textsecuregcm.storage.ProfilesManager; import org.whispersystems.textsecuregcm.storage.VersionedProfile; import org.whispersystems.textsecuregcm.storage.VersionedProfileV1; import org.whispersystems.textsecuregcm.storage.WriteConflictException; -import org.whispersystems.textsecuregcm.purchases.ReceiptLevel; import org.whispersystems.textsecuregcm.tests.util.AuthHelper; import org.whispersystems.textsecuregcm.tests.util.ProfileTestHelper; import org.whispersystems.textsecuregcm.util.MockUtils; @@ -973,35 +973,33 @@ public class ProfileGrpcServiceTest extends SimpleBaseGrpcTest