Possible encrypt fix
This commit is contained in:
@@ -57,24 +57,27 @@ namespace ErgometerLibrary
|
|||||||
|
|
||||||
string str;
|
string str;
|
||||||
NetCommand net;
|
NetCommand net;
|
||||||
|
str = ReadString(client);
|
||||||
|
|
||||||
try {
|
if (str != "")
|
||||||
str = AESEncrypt.DecryptString(ReadString(client));
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
str = AESEncrypt.DecryptString(str);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
str = "";
|
str = "";
|
||||||
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
|
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str != "")
|
|
||||||
try {
|
try {
|
||||||
net = NetCommand.Parse(str);
|
net = NetCommand.Parse(str);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
|
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
|
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
|
||||||
return net;
|
return net;
|
||||||
|
|||||||
Reference in New Issue
Block a user