mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 19:13:11 +08:00
Fix wrong password handling (string -> byte[])
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user