Fix wrong password handling (string -> byte[])

This commit is contained in:
Christian Kratky
2019-05-27 00:21:55 +02:00
parent 98e17903ea
commit ccfe67e6a6
13 changed files with 52 additions and 25 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ namespace MQTTnet.TestApp.NetCore
{
if (p.ClientId == "SpecialClient")
{
if (p.Username != "USER" || p.Password != "PASS")
var password = Encoding.UTF8.GetString(p.Password);
if (p.Username != "USER" || password != "PASS")
{
p.ReturnCode = MqttConnectReturnCode.ConnectionRefusedBadUsernameOrPassword;
}