Fix issue 1467 - Password is now hashed when adding a user via REST API

This commit is contained in:
Lucas Nicodemus 2017-07-15 13:32:27 -06:00
parent 587d1b7390
commit 983a678ff3

View file

@ -520,9 +520,10 @@ namespace TShockAPI
return RestMissingParam("password");
// NOTE: ip can be blank
User user = new User(username, password, "", group, "", "", "");
User user = new User(username, "", "", group, "", "", "");
try
{
user.CreateBCryptHash(password);
TShock.Users.AddUser(user);
}
catch (Exception e)