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
F14661439: D19396.id46397.diff
Sun, Jan 12, 5:56 AM
Unknown Object (File)
Sat, Dec 28, 2:11 PM
Unknown Object (File)
Wed, Dec 25, 3:04 AM
Unknown Object (File)
Tue, Dec 24, 1:00 PM
Unknown Object (File)
Tue, Dec 24, 2:30 AM
Unknown Object (File)
Thu, Dec 19, 5:54 PM
Unknown Object (File)
Dec 8 2024, 6:03 AM
Unknown Object (File)
Dec 3 2024, 3:38 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
Branch
setup1
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 20209
Build 27424: Run Core Tests
Build 27423: arc lint + arc unit