Page MenuHomePhabricator

Don't emit Content-Security-Policy when returning a response during preflight setup checks
ClosedPublic

Authored by epriestley on Mar 5 2018, 2:52 PM.
Tags
None
Referenced Files
F19090576: D19172.id.diff
Dec 3 2025, 12:16 PM
F19083877: D19172.diff
Dec 2 2025, 1:57 PM
F18860687: D19172.id.diff
Nov 2 2025, 12:22 PM
F18857218: D19172.diff
Nov 1 2025, 1:59 PM
F18813349: D19172.id45926.diff
Oct 20 2025, 3:32 PM
F18782446: D19172.id45925.diff
Oct 13 2025, 1:34 AM
F18750050: D19172.id.diff
Oct 4 2025, 6:18 AM
F18738012: D19172.diff
Oct 1 2025, 1:43 PM
Subscribers
None

Details

Summary

Ref T4340. See https://discourse.phabricator-community.org/t/core-exception-during-installation/1193/8.

If we return a response very early during setup, we may not be able to read from the environment yet. Just decline to build a "Content-Security-Policy" header in these cases.

Test Plan
  • Faked a preflight error (e.g., safe_mode enabled), restarted apache.
    • Before patch: environment error while generating CSP.
    • After patch: no error.
  • Loaded a normal page, observed an normal CSP header.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 5 2018, 2:53 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.