[ISSUE] Turning a slot on takes over a homeowner's code at its index without warning
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
Direzione di ricerca
Start with the slot-adoption logic that writes to an untagged user at a credential index, as introduced in #1518 and changed by #1696, and the core store's wrote hash from M5a. Check how the Matter and Z-Wave User Credential paths decide adoption when a slot is turned on. Done means turning on a slot whose index holds an untagged user raises a repair and leaves the user and PIN untouched, while LCM's own tagged codes still adopt normally.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
Found while reviewing #1696, the feature/clean-room-core fix for #1695. This isn't new: it has existed since adoption was introduced around #1518.
On locks with user records (Matter, Z-Wave User Credential CC), writing a slot adopts any untagged lock user that holds a PIN at the slot's credential index. LCM renames that user with its lcm:<slot>: tag and overwrites the PIN. This is how LCM takes over its own codes from before it tagged them, but it can't tell those apart from a homeowner's code.
After #1696, a homeowner's code at a turned-off slot's index is correctly left alone: the slot reads off and in sync. But when that slot is turned back on, LCM adopts the homeowner's user, renames it, and replaces their PIN. Nothing warns first.
The options flow and allocation (#1693, #1696) already refuse to offer such an index to a new slot. Turning on a slot that's already configured skips that check.
Expected: LCM adopts an untagged user only when there's evidence it's LCM's own:
- the core store remembers LCM writing that slot on this lock (M5a's salted
wrotehash), or - on Z-Wave,
user_id == slotwith a matching pre-tag write record.
Otherwise the slot is held with a repair along the lines of "someone else's code is at this slot's index on ; remove it or move this user to another slot". No overwrite.
Steps to reproduce the issue
- A configuration has slot 3 on a Matter lock, with its user turned off.
- The homeowner adds their own user with a PIN at credential index 3, through HA's Matter fabric or the vendor app.
- LCM reads slot 3 as off and in sync (correct after #1696).
- Turn slot 3's user back on.
- LCM renames the homeowner's user to
lcm:3:…and overwrites their PIN.
Home Assistant Version
dev (test harness)
What version of Lock Code Manager are you running?
feature/clean-room-core with #1696
Lock make and model
Matter; Z-Wave locks with User Credential CC
🤖 Generated with Claude Code
- Lingua principale
- Python
- Stelle
- 112
- Fork
- 20
- Merge medio
- 2h 53m
- PR unite (30g)
- 140
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di raman325/lock_code_manager
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
raman325/lock_code_manager#1771 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
raman325/lock_code_manager#1768 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
raman325/lock_code_manager#1754 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
raman325/lock_code_manager#1739 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
raman325/lock_code_manager#858 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di raman325/lock_code_manager
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
btclib-org/btclib-node#2083 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Gathin23/cleanyourtv#2089 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jxxghp/MoviePilot#7212 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
cli dx rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
NekomyaDev/nudge#278 ·
I maintainer di solito rispondono entro 1 giorno