Kaynağa Gözat

fix (lock): don't include the admin flag in the unlock request

Based on the limited samples of data available, this admin flag from the
Tuya documentation does not seem to be used in practice, and it doesn't
seem a secure way of granting admin rights anyway.

Discussion #4013
Jason Rumney 5 ay önce
ebeveyn
işleme
a8a4573d5b
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      custom_components/tuya_local/lock.py

+ 1 - 1
custom_components/tuya_local/lock.py

@@ -229,5 +229,5 @@ class TuyaLocalLock(TuyaLocalEntity, LockEntity):
         msg += member_id.to_bytes(2, "big")
         msg += code.encode("ascii")
         msg += source.to_bytes(2, "big")
-        msg += b"\x00"  # ordinary user (0x01 is admin)
+        # msg += b"\x00"  # ordinary user (0x01 is admin)
         return b64encode(msg).decode("utf-8")