I have MVC
model where I declare a property Password with DataType
annotation as DataType.Password
.
Veracode
scan points out the line with that property declaration.
That property is getting its value assigned from a login page.
I saw examples of using SecureString
. But how can I change the declaration of my property in the model and map it to the login page?
This is the property declaration:
[DataType(DataType.Password)]
public string Password {get;set;}
Then in the code, I use that property to log in to the application.
HOw can I change the declaration, so I fix the Veracode
error?