From 71d05f51ec75c19f26d275a9a5ee1cbc65db64aa Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 24 Jul 2011 17:36:57 -0600 Subject: [PATCH] Fixed broken auth system. --- TShockAPI/Tools.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Tools.cs b/TShockAPI/Tools.cs index 785340af..345f184c 100755 --- a/TShockAPI/Tools.cs +++ b/TShockAPI/Tools.cs @@ -502,8 +502,8 @@ namespace TShockAPI /// string sha256 public static string HashPassword(string password) { - if (string.IsNullOrEmpty(password)) - throw new NullReferenceException("Password can not be null/empty"); + if (string.IsNullOrEmpty(password) || password == "non-existant password") + return "non-existant password"; var bytes = HashAlgo.ComputeHash(Encoding.ASCII.GetBytes(password)); return bytes.Aggregate("", (s, b) => s + b.ToString("X2")); }