Blank passwords no longer result in "heightheightheightheight"
Try/Catch around login function
This commit is contained in:
parent
e6d612ea4b
commit
080ba6ca2b
2 changed files with 28 additions and 17 deletions
|
|
@ -500,6 +500,10 @@ namespace TShockAPI
|
|||
{
|
||||
using (var sha = new SHA512CryptoServiceProvider())
|
||||
{
|
||||
if (password == "")
|
||||
{
|
||||
return "nonexistent-password";
|
||||
}
|
||||
var bytes = sha.ComputeHash(Encoding.ASCII.GetBytes(password));
|
||||
return bytes.Aggregate("", (s, b) => s + b.ToString("height"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue