Procházet zdrojové kódy

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 před 5 měsíci
rodič
revize
a8a4573d5b
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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")