Commit 76512c4
authored
fix(ctap2): decode unsignedExtensionOutputs at GetAssertion 0x08 (#244)
The assertion response mapped entry 0x08 to a value it should not have,
while the protocol defines 0x08 as the unsigned extension outputs map.
An authenticator that returns that map caused the whole assertion
response to fail to decode, breaking the ceremony. This becomes more
likely as newer authenticators emit unsigned extension outputs.
This decodes entry 0x08 as the unsigned extension outputs map and
removes two response fields that were never populated with valid data.
Scope: this fixes the decode failure. The unsigned outputs are kept on
the decoded response but are not yet merged into the caller-facing
extension results, since arbitrary CBOR maps do not map cleanly to the
typed JSON outputs. That can be a follow-up. The change also drops two
unused fields from the public assertion type, a minor change for a
pre-1.0 crate.
Includes a regression test that decodes a response carrying the map and
confirms it parses.1 parent ba35dde commit 76512c4
3 files changed
Lines changed: 29 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
221 | 220 | | |
222 | 221 | | |
223 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | | - | |
457 | 455 | | |
458 | 456 | | |
459 | 457 | | |
| |||
1229 | 1227 | | |
1230 | 1228 | | |
1231 | 1229 | | |
1232 | | - | |
1233 | | - | |
1234 | 1230 | | |
1235 | 1231 | | |
1236 | 1232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 373 | + | |
378 | 374 | | |
379 | 375 | | |
380 | 376 | | |
| |||
462 | 458 | | |
463 | 459 | | |
464 | 460 | | |
465 | | - | |
466 | | - | |
467 | 461 | | |
468 | 462 | | |
469 | 463 | | |
| |||
575 | 569 | | |
576 | 570 | | |
577 | 571 | | |
578 | | - | |
579 | | - | |
| 572 | + | |
580 | 573 | | |
581 | 574 | | |
582 | 575 | | |
| |||
660 | 653 | | |
661 | 654 | | |
662 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
663 | 680 | | |
0 commit comments