Commit e43a4af
committed
Address copilot pass 1 on #4
Ten findings, all real. Five for behavior, four for wording, one
cleanup.
Behavior:
1. VM controller hard-coded to webId. The builder now accepts an
explicit `controller` (defaulting to webId for the common
self-controlled case); the doctor passes `lastController` from
diagnostics so delegated-control profiles produce VMs that match
the profile's outer controller predicate. Verified end-to-end
against the JSS verifier in self-controlled, delegated-controlled,
and mismatched scenarios.
2. memPrivKey + lastVmKid weren't cleared on sign-out. The UI
promised sign-out clears state, and a privkey sitting in a tab
that's no longer authenticated is just exposure with no purpose.
Now nulled (and the input field cleared) when the session goes
inactive.
3. Read-modify-write PUT had no concurrency control. Now captures
ETag from the GET and sends it via If-Match on the PUT, with a
clear "profile changed since GET" error on 412/409.
4. mergeVerificationMethod only matched object entries, missing
string-IRI entries. JSON-LD permits VMs to be referenced by IRI
string, so an existing string entry could leave a duplicate when
merged. Now matches both forms via entryMatchesId.
5. Idempotent merge could silently clobber a different key sitting
at the same fragment. Now compares publicKeyJwk material (kty,
crv, x, y) and refuses to overwrite if the existing key differs,
pointing the user to a fresh fragment.
Wording (README/UI said "PATCH" but code does GET+PUT):
6. README's B.3 description.
7. lws-auth section's intro.
8. The "future" hint in the B.2 section is now stale — replaced
with a pointer to B.3.
Cleanup:
9. lastProfile was assigned but never read — dropped.
10. New patch-section hint clarifies why we PUT instead of PATCH
(JSS conneg-layer edge cases on patch round-trips).1 parent b0f2daa commit e43a4af
4 files changed
Lines changed: 92 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
210 | 208 | | |
211 | 209 | | |
212 | 210 | | |
213 | | - | |
214 | 211 | | |
215 | 212 | | |
216 | 213 | | |
| |||
357 | 354 | | |
358 | 355 | | |
359 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| |||
435 | 439 | | |
436 | 440 | | |
437 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
438 | 446 | | |
439 | 447 | | |
440 | 448 | | |
| |||
445 | 453 | | |
446 | 454 | | |
447 | 455 | | |
| 456 | + | |
448 | 457 | | |
449 | 458 | | |
450 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
451 | 467 | | |
452 | 468 | | |
453 | | - | |
| 469 | + | |
454 | 470 | | |
455 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
456 | 477 | | |
457 | 478 | | |
458 | 479 | | |
| |||
518 | 539 | | |
519 | 540 | | |
520 | 541 | | |
521 | | - | |
522 | | - | |
523 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
524 | 556 | | |
525 | 557 | | |
526 | 558 | | |
527 | 559 | | |
528 | 560 | | |
529 | 561 | | |
530 | | - | |
531 | | - | |
532 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
533 | 581 | | |
534 | 582 | | |
535 | 583 | | |
| |||
542 | 590 | | |
543 | 591 | | |
544 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
545 | 609 | | |
546 | 610 | | |
547 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
0 commit comments