Commit 21a3606
committed
fix: strip session token from bootstrap response body and add conditional secure cookie flag
- Remove sessionToken from the JSON response body of /api/auth/bootstrap
to prevent XSS-based session theft. The token is still set as an
httpOnly cookie, which is the intended transport for browser sessions.
- Add secure flag to the session cookie when auth policy is
'remote-reachable', preventing cookie transmission over plaintext HTTP
in non-loopback environments.
- Update server tests to extract session tokens from Set-Cookie headers
instead of the response body.
- Update web client to no longer expect sessionToken in bootstrap response.1 parent dca54c7 commit 21a3606
File tree
5 files changed
+23
-17
lines changed- apps
- server/src
- auth
- web
- src
- test
5 files changed
+23
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
| |||
509 | 515 | | |
510 | 516 | | |
511 | 517 | | |
512 | | - | |
513 | 518 | | |
514 | 519 | | |
| 520 | + | |
| 521 | + | |
515 | 522 | | |
516 | 523 | | |
517 | 524 | | |
518 | | - | |
| 525 | + | |
| 526 | + | |
519 | 527 | | |
520 | 528 | | |
521 | 529 | | |
| |||
525 | 533 | | |
526 | 534 | | |
527 | 535 | | |
528 | | - | |
529 | | - | |
| 536 | + | |
| 537 | + | |
530 | 538 | | |
531 | 539 | | |
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
535 | 543 | | |
536 | | - | |
| 544 | + | |
537 | 545 | | |
538 | 546 | | |
539 | | - | |
| 547 | + | |
540 | 548 | | |
541 | 549 | | |
542 | 550 | | |
| |||
720 | 728 | | |
721 | 729 | | |
722 | 730 | | |
723 | | - | |
| 731 | + | |
| 732 | + | |
724 | 733 | | |
725 | 734 | | |
| 735 | + | |
726 | 736 | | |
727 | 737 | | |
728 | 738 | | |
729 | | - | |
| 739 | + | |
730 | 740 | | |
731 | 741 | | |
732 | 742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
0 commit comments