Commit 938bf13
committed
Add nonceScriptSrcElem(), remove mintedNonce()
Added nonceScriptSrcElem() to wire the request nonce into script-src-elem (valid
there per CSP3), needed when a page's script-src-elem uses 'strict-dynamic'.
Removed mintedNonce(): inspecting whether a nonce was minted anywhere is the
wrong signal for the inline viewer - the deciding factor is whether the governing
script directive uses 'strict-dynamic'; callers inspect directive() instead.1 parent 41d47a1 commit 938bf13
2 files changed
Lines changed: 17 additions & 29 deletions
File tree
- modules/web/web-api/src
- main/java/com/enonic/xp/web/csp
- test/java/com/enonic/xp/web/csp
Lines changed: 12 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
623 | | - | |
624 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
625 | 629 | | |
626 | | - | |
| 630 | + | |
627 | 631 | | |
628 | | - | |
| 632 | + | |
629 | 633 | | |
630 | 634 | | |
631 | 635 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
| 636 | + | |
| 637 | + | |
640 | 638 | | |
641 | | - | |
| 639 | + | |
642 | 640 | | |
643 | | - | |
| 641 | + | |
644 | 642 | | |
645 | 643 | | |
646 | 644 | | |
| |||
Lines changed: 5 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
| 837 | + | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
854 | 844 | | |
855 | 845 | | |
856 | 846 | | |
| |||
0 commit comments