From 398cc22d5f839071d7ca6e155cd3b8184bc7fe73 Mon Sep 17 00:00:00 2001 From: Hasan Elsherbiny Date: Tue, 14 Nov 2023 12:47:59 +0200 Subject: [PATCH] Length restriction on frontend inputs #6552 --- src/Presentation/Nop.Web/Models/Customer/LoginModel.cs | 1 + src/Presentation/Nop.Web/Models/Customer/RegisterModel.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Presentation/Nop.Web/Models/Customer/LoginModel.cs b/src/Presentation/Nop.Web/Models/Customer/LoginModel.cs index 8ef2bb5aaae..49b7ccf6691 100644 --- a/src/Presentation/Nop.Web/Models/Customer/LoginModel.cs +++ b/src/Presentation/Nop.Web/Models/Customer/LoginModel.cs @@ -23,6 +23,7 @@ public partial record LoginModel : BaseNopModel [DataType(DataType.Password)] [NoTrim] + [MaxLength(length: 1000)] [NopResourceDisplayName("Account.Login.Fields.Password")] public string Password { get; set; } diff --git a/src/Presentation/Nop.Web/Models/Customer/RegisterModel.cs b/src/Presentation/Nop.Web/Models/Customer/RegisterModel.cs index 1c1155ba5bc..6ab3c5258a3 100644 --- a/src/Presentation/Nop.Web/Models/Customer/RegisterModel.cs +++ b/src/Presentation/Nop.Web/Models/Customer/RegisterModel.cs @@ -36,6 +36,7 @@ public RegisterModel() [NoTrim] [DataType(DataType.Password)] [NopResourceDisplayName("Account.Fields.Password")] + [MaxLength(length: 1000)] public string Password { get; set; } [NoTrim]