From 3c9ad99d4a5eeeb53f7380315197e7133f84d10c Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 27 十月 2020 14:57:33 +0800 Subject: [PATCH] 2020-10-27 1V2.510271 1.密码规则修改,修改为:密码必须为8-20个字符,包含字母、数字和符号。 2.APP本地增加登录,密码错误锁定,连续错误5次登录锁定,锁定5分钟。 3.登录界面,增加登录账号的邮箱格式匹配检测。 4.增加iOS越狱和Androidr Root检测,强制关闭APP。 --- Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs b/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs index 06bf05b..18c142a 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs @@ -100,6 +100,7 @@ try { if (!isSubscribeTopicSuccess) { + var topicFilterCommon = new TopicFilter () { Topic = $"/BusGateWayToClient/{CurRemoteMACInfo.macMark}/Common/#", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce @@ -123,12 +124,30 @@ QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce }; - + var topicFilters = new TopicFilter [] { topicFilterCommon, topicFilterGateWayInfoChange, topicFilterNotifySqueeze, topicFilterNotifyGateWayOffline }; var result = await RemoteMqttClient.SubscribeAsync (topicFilters); if (result.Items [0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS2) { isSubscribeTopicSuccess = true; } + + ////2020-06-22 閫氱敤涓婚 + //var topicFilterMacMark = new TopicFilter () { + // Topic = $"/BusGateWayToClient/{CurRemoteMACInfo.macMark}/#", + // QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce + //}; + + ////鎸や笅绾夸富棰� + //var topicFilterNotifySqueeze = new TopicFilter () { + // Topic = $"/BusGateWayToClient/{mMqttInfo.connEmqClientId}/Push/NotifySqueeze", + // QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce + //}; + + //var topicFilters = new TopicFilter [] { topicFilterMacMark, topicFilterNotifySqueeze }; + //var result = await RemoteMqttClient.SubscribeAsync (topicFilters); + //if (result.Items [0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS2) { + // isSubscribeTopicSuccess = true; + //} } } catch (Exception ex) { @@ -192,6 +211,9 @@ //琛ㄧず鍚庨潰灏嗚繘琛岃繛鎺� #region 鍒濆鍖栬繙绋婱qtt + //2020-06-22 澧炲姞 + RemoteMqttClient = new MqttFactory ().CreateMqttClient (); + //(3)褰揫杩炴帴浜戠鐨凪qtt鎴愬姛鍚嶿鎴栬�匸浠ュ強鍚庨潰App閫氳繃浜戠Mqtt杞彂鏁版嵁缁欑綉鍏虫垚鍔熷悗],澶勭悊鎺ユ敹鍒颁簯绔暟鎹寘鍝嶅簲鏃跺湪mqttServerClient_ApplicationMessageReceived杩欎釜鏂规硶澶勭悊 if (RemoteMqttClient.ApplicationMessageReceivedHandler == null) { RemoteMqttClient.UseApplicationMessageReceivedHandler (async (e) => { -- Gitblit v1.8.0