Fix issue 1467 - Password is now hashed when adding a user via REST API
This commit is contained in:
parent
587d1b7390
commit
983a678ff3
1 changed files with 2 additions and 1 deletions
|
|
@ -520,9 +520,10 @@ namespace TShockAPI
|
||||||
return RestMissingParam("password");
|
return RestMissingParam("password");
|
||||||
|
|
||||||
// NOTE: ip can be blank
|
// NOTE: ip can be blank
|
||||||
User user = new User(username, password, "", group, "", "", "");
|
User user = new User(username, "", "", group, "", "", "");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
user.CreateBCryptHash(password);
|
||||||
TShock.Users.AddUser(user);
|
TShock.Users.AddUser(user);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue