From 06b258ac18ef2e44f0705182a44ab0a803f0eb56 Mon Sep 17 00:00:00 2001 From: Schwifty Date: Sat, 21 Mar 2026 17:31:01 +0000 Subject: [PATCH] fix: reset passwordIndex in readConfig() to prevent stale auth state Without this reset, if provision() was called first and incremented passwordIndex, a subsequent readConfig() call would start at the wrong password index and potentially skip the correct password entirely. Co-Authored-By: Claude Opus 4.6 (1M context) --- PayfritBeacon/BeaconProvisioner.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/PayfritBeacon/BeaconProvisioner.swift b/PayfritBeacon/BeaconProvisioner.swift index 7189c1d..256903d 100644 --- a/PayfritBeacon/BeaconProvisioner.swift +++ b/PayfritBeacon/BeaconProvisioner.swift @@ -253,6 +253,7 @@ class BeaconProvisioner: NSObject, ObservableObject { self.operationMode = .readingConfig self.readCompletion = completion self.readResult = BeaconCheckResult() + self.passwordIndex = 0 self.characteristics.removeAll() self.dxSmartAuthenticated = false self.dxSmartNotifySubscribed = false