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