Page MenuHomePhabricator

Fix excessively severe CSP URI error during first-time setup
ClosedPublic

Authored by epriestley on Apr 21 2018, 4:31 PM.
Tags
None
Referenced Files
F15535312: D19396.diff
Thu, Apr 24, 4:28 AM
F15465984: D19396.id46398.diff
Apr 3 2025, 12:37 AM
F15451803: D19396.diff
Mar 28 2025, 11:54 PM
F15441891: D19396.id46398.diff
Mar 26 2025, 8:32 PM
F15434683: D19396.id46398.diff
Mar 25 2025, 4:55 AM
F15433565: D19396.id46398.diff
Mar 24 2025, 11:46 PM
F15376517: D19396.diff
Mar 13 2025, 4:13 AM
F15333264: D19396.id46398.diff
Mar 8 2025, 1:28 AM
Subscribers
None

Details

Summary

See D19394. Currently, during first-time setup before you configure "phabricator.base-uri", we may attempt to generate a setup page, try to generate a CSP header for it, and fail to access the environmental config. This causes a too-severe error page ("configure phabricator.base-uri") instead of preflight guidance (like "can't connect to MySQL").

Instead, treat this more like "security.alternate-file-domain" and just bail on CSP if we can't fetch it.

Test Plan

On a fresh (non-explodey laptop) install with critical setup errors (no MySQL installed yet), loaded Phabricator. Before: error about phabricator.base-uri. After: more helpful guidance about installing/configuring MySQL.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable