Skip to content

Commit f44c9b2

Browse files
digitalcoyotewilldean
authored andcommitted
Fixed # 835 (#850)
Added StringLength validator to prevent saving passwords longer than 50
1 parent 47d38d8 commit f44c9b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Bonobo.Git.Server/Models/AccountModels.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public class UserEditModel
103103

104104
[DataType(DataType.Password)]
105105
[Display(ResourceType = typeof(Resources), Name = "Account_Edit_NewPassword")]
106+
[StringLength(50, ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "Validation_StringLength")]
106107
public string NewPassword { get; set; }
107108

108109
[System.ComponentModel.DataAnnotations.Compare("NewPassword", ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "Validation_Compare")]

0 commit comments

Comments
 (0)