mirror of
https://github.com/bitwarden/server.git
synced 2025-04-07 05:58:13 -05:00
[SM-240] Add encrypted length limits to request models (#3095)
This commit is contained in:
parent
1a21eca481
commit
ab5c6d088b
@ -8,6 +8,7 @@ public class ProjectCreateRequestModel
|
|||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(1000)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public Project ToProject(Guid organizationId)
|
public Project ToProject(Guid organizationId)
|
||||||
|
@ -8,6 +8,7 @@ public class ProjectUpdateRequestModel
|
|||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(1000)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public Project ToProject(Guid id)
|
public Project ToProject(Guid id)
|
||||||
|
@ -8,14 +8,17 @@ public class SecretCreateRequestModel : IValidatableObject
|
|||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(1000)]
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(5000)]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(10000)]
|
||||||
public string Note { get; set; }
|
public string Note { get; set; }
|
||||||
|
|
||||||
public Guid[] ProjectIds { get; set; }
|
public Guid[] ProjectIds { get; set; }
|
||||||
|
@ -8,14 +8,17 @@ public class SecretUpdateRequestModel : IValidatableObject
|
|||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(1000)]
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(5000)]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(10000)]
|
||||||
public string Note { get; set; }
|
public string Note { get; set; }
|
||||||
|
|
||||||
public Guid[] ProjectIds { get; set; }
|
public Guid[] ProjectIds { get; set; }
|
||||||
|
@ -8,6 +8,7 @@ public class ServiceAccountUpdateRequestModel
|
|||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(1000)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public ServiceAccount ToServiceAccount(Guid id)
|
public ServiceAccount ToServiceAccount(Guid id)
|
||||||
|
@ -8,6 +8,7 @@ public class ServiceAccountCreateRequestModel
|
|||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[EncryptedString]
|
[EncryptedString]
|
||||||
|
[EncryptedStringLength(1000)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public ServiceAccount ToServiceAccount(Guid organizationId)
|
public ServiceAccount ToServiceAccount(Guid organizationId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user