Fixed password storage when it isn't set
Disabled hashing on an empty string
This commit is contained in:
@@ -55,8 +55,12 @@ namespace Barotrauma.Networking
|
||||
name = name.Replace(":", "");
|
||||
name = name.Replace(";", "");
|
||||
|
||||
this.name = name;
|
||||
this.password = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password)));
|
||||
this.name = name;
|
||||
this.password = "";
|
||||
if (password.Length>0)
|
||||
{
|
||||
this.password = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password)));
|
||||
}
|
||||
|
||||
config = new NetPeerConfiguration("barotrauma");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user