Commit 09e820c
Fix ZonePathContextRewritingFilter rewriting
RFC 6265bis requires `__Host-` prefixed cookies to unconditionally have `Path=/`.
The `ZonePathContextRewritingFilter` was incorrectly mutating the path of these
cookies to the zone context path (e.g. `/auth`), causing browsers to reject them
and resulting in CSRF token mismatch errors.
This change updates the filter to exclude `__Host-` prefixed cookies from path
rewriting, ensuring they retain their required `Path=/` attribute.
Co-authored-by: Cursor <cursoragent@cursor.com>__Host- cookie paths1 parent 0cbf5f6 commit 09e820c
2 files changed
Lines changed: 44 additions & 4 deletions
File tree
- server/src
- main/java/org/cloudfoundry/identity/uaa/zone
- test/java/org/cloudfoundry/identity/uaa/zone
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
319 | 322 | | |
320 | 323 | | |
321 | 324 | | |
| |||
351 | 354 | | |
352 | 355 | | |
353 | 356 | | |
354 | | - | |
| 357 | + | |
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
| |||
Lines changed: 40 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
462 | 479 | | |
463 | 480 | | |
464 | 481 | | |
| |||
596 | 613 | | |
597 | 614 | | |
598 | 615 | | |
599 | | - | |
| 616 | + | |
| 617 | + | |
600 | 618 | | |
601 | 619 | | |
602 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
603 | 636 | | |
604 | 637 | | |
605 | 638 | | |
| |||
609 | 642 | | |
610 | 643 | | |
611 | 644 | | |
612 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
613 | 648 | | |
614 | 649 | | |
615 | 650 | | |
| |||
621 | 656 | | |
622 | 657 | | |
623 | 658 | | |
624 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
625 | 662 | | |
626 | 663 | | |
627 | 664 | | |
| |||
0 commit comments