Commit e47c2ae
fix(auth-service): make cspNonce required on renderChooseHandlePage
- renderChooseHandlePage: promote cspNonce to a required parameter and
always stamp nonce="..." on the inline <script>. All 5 call sites
already pass res.locals.cspNonce, so the previous `cspNonce?` +
conditional fallback only served to mask a future wiring bug where
a caller forgot the nonce — the CSP is now nonce-based, so missing
nonce means broken page, not graceful degradation.
- preview-ui: reword renderPreviewIndexPage cspNonce docstring. pds-core
does serve at least one preview page (/preview/consent) under a CSP
with 'unsafe-inline', so "omit when the service doesn't set a CSP"
was misleading; frame the rule around the page's CSP rather than
the service.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 4a2f31d commit e47c2ae
2 files changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
0 commit comments