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
F18605856: D19396.diff
Sat, Sep 13, 9:29 PM
F18509589: D19396.id.diff
Fri, Sep 5, 3:29 AM
F18502780: D19396.diff
Thu, Sep 4, 10:39 PM
F18222209: D19396.id.diff
Tue, Aug 19, 8:26 PM
F18208460: D19396.diff
Mon, Aug 18, 9:06 PM
F18112207: D19396.id46398.diff
Aug 12 2025, 4:12 PM
F18112206: D19396.id46397.diff
Aug 12 2025, 4:12 PM
F18112205: D19396.id.diff
Aug 12 2025, 4:12 PM
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