Commit 92cb201
committed
fix(ios): remove erroneous keychain cleanup causing data loss on upgrade
The clearAllKeychainEntriesSync() function was incorrectly wiping all Keychain entries when upgrading from v1.2.0 to v1.3.0+.
The function's premise was flawed:
- v1.2.0 used kSecAttrAccessibleWhenUnlockedThisDeviceOnly, which is NOT
biometric protection (just "accessible when unlocked")
- Biometric auth in v1.3.0+ uses LAContext, a completely separate API
- There were no "old biometric prompts" to prevent
Only users upgrading FROM v1.2.0 were affected. In-between version upgrades (e.g., v1.3.0→v1.4.0→v1.4.1) were safe because the cleanup tracked its execution via NSUserDefaults BIOMETRIC_CLEANUP_KEY flag, running only once on first launch after the v1.2.0 upgrade.
The legitimate cleanupOrphanedKeychainEntries() function (for handling app reinstalls) remains unchanged.1 parent 3c2acca commit 92cb201
File tree
5 files changed
+23
-47
lines changed- ksafe-compose
- ksafe
- src/iosMain/kotlin/eu/anifantakis/lib/ksafe
5 files changed
+23
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
5 | 24 | | |
6 | 25 | | |
7 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 0 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | 388 | | |
396 | 389 | | |
397 | 390 | | |
398 | 391 | | |
399 | 392 | | |
400 | 393 | | |
401 | 394 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | 395 | | |
439 | 396 | | |
440 | 397 | | |
| |||
0 commit comments