Commit 502969b
fix(classic): show locked card dialog instead of crashing, remove inline key recovery
Three fixes:
1. CardUnauthorizedException extended Throwable directly, but the catch
clause in PN53xReaderBackend catches Exception. The exception escaped
uncaught, killing the coroutine thread. The "reading" sheet stayed up
forever and no error dialog appeared. Fix: extend Exception.
2. Remove inline key recovery from home screen scan. Key recovery should
happen on the dedicated key recovery screen, not during the initial
card read. This avoids the slow nested attack blocking the scan UI.
3. Fix reselectCard() in PN533RawClassic to not cycle RF field. Instead,
wait for the card's auth timeout then InRelease + InListPassiveTarget.
This keeps the card powered so the PRNG continues running — required
for PRNG distance calibration in the nested attack.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bd17643 commit 502969b
File tree
4 files changed
+27
-15
lines changed- app
- desktop/src/jvmMain/kotlin/com/codebutler/farebot/desktop
- web/src/wasmJsMain/kotlin/com/codebutler/farebot/web
- keymanager/src/commonMain/kotlin/com/codebutler/farebot/keymanager/pn533
4 files changed
+27
-15
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| 183 | + | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
233 | 234 | | |
234 | | - | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
Lines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| 133 | + | |
| 134 | + | |
128 | 135 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
| |||
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
309 | | - | |
310 | | - | |
| 319 | + | |
| 320 | + | |
311 | 321 | | |
312 | 322 | | |
313 | 323 | | |
| |||
0 commit comments