Require minimum password length of 4, and trim new passwords for whitespace.

Fixes problems reported by @MarioE and @Simon311:
- Users can no longer register with whitespace for a password.
- Users can no longer register with 4 whitespaces for a password.
This commit is contained in:
Lucas Nicodemus 2015-04-13 14:24:12 -06:00
parent 845c8c4b3d
commit 12f893e0cb
3 changed files with 28 additions and 5 deletions

View file

@ -401,6 +401,9 @@ namespace TShockAPI
[Description("Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify. Range: 5-31.")]
public int BCryptWorkFactor = 7;
[Description("The minimum password length for new user accounts. Minimum value is 4.")]
public int MinimumPasswordLength = 4;
/// <summary>
/// Reads a configuration file from a given path
/// </summary>