Commit 2ceaded
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 82e5bf3 commit 2ceaded
2 files changed
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
| 536 | + | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
362 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
| |||
0 commit comments