Update constraints on account attributes name

This commit is contained in:
Moxie Marlinspike 2019-01-04 00:18:13 -08:00
parent 8eb6fc8343
commit 5090c07846
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ public class AccountAttributes {
private int registrationId;
@JsonProperty
@Length(max = 50, message = "This field must be less than 50 characters")
@Length(max = 204, message = "This field must be less than 50 characters")
private String name;
@JsonProperty

View File

@ -195,7 +195,7 @@ public class DeviceControllerTest {
.target("/v1/devices/5678901")
.request()
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_NUMBER, "password1"))
.put(Entity.entity(new AccountAttributes("keykeykeykey", false, 1234, "this is a really long name that is longer than 80 characters", true, true, null),
.put(Entity.entity(new AccountAttributes("keykeykeykey", false, 1234, "this is a really long name that is longer than 80 characters it's so long that it's even longer than 204 characters. that's a lot of characters. we're talking lots and lots and lots of characters. 12345678", true, true, null),
MediaType.APPLICATION_JSON_TYPE));
assertEquals(response.getStatus(), 422);