Commit f1c3ef18b54b806d22ca7871a4e19e53780829b8

Authored by xp.Huang
2 parents f83090ec 7040b0a9

Merge branch 'cherry-pick-fc6d5841' into 'master'

fix: 修改TCP数据携带的鉴权逻辑,设备上报的HEX长度,小于产品里面设置数据携带的最小HEX长度,则丢弃

See merge request yunteng/thingskit!477
... ... @@ -301,7 +301,8 @@ public class DefaultTransportApiService implements TransportApiService {
301 301 for (String key : profiles.keySet()) {
302 302 TkTcpDeviceProfileTransportConfiguration profile = (TkTcpDeviceProfileTransportConfiguration) profiles.get(key);
303 303 TkTcpDeviceProfileTransportConfiguration.DataCombinationAuth combinationInfo = profile.getCombinationInfo();
304   - if(credentialsId.length() != profile.getCombinationInfo().getHexLength()){
  304 + //设备上报的HEX长度,小于产品里面设置数据携带的最小HEX长度,则丢弃
  305 + if(credentialsId.length() < profile.getCombinationInfo().getHexLength()){
305 306 continue;
306 307 }
307 308 String filterPrefix = combinationInfo.getFilterPrefix();
... ...