1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/config/check
epriestley cdeea11fd3 Don't actually construct auth providers when checking for their existence
Summary:
A user reported this stack trace:

http://pastebin.com/6auGbZsE

...on this GitHub issue:

https://github.com/facebook/phabricator/issues/389#issuecomment-36612511

The problem is similar to the original report, but not identical. In this case, we're following a sequence of steps like:

  - Run setup checks.
    - Check for enabled providers, in order to raise "no providers configured yet" warning.
      - Try to generate login/redirect URIs.
  - Build the request.
  - Set the default base URI.
  - Run normal code.

Since we try to generate URIs before we provide a default, this fatals. Instead, don't try to build objects.

An alternative fix might be to try to set defaults earlier, but we depend on some config and on building the Request in order to be able to figure out if a request is HTTP or HTTPS right now. We could assume one, or guess, or use protocol-relative URIs (`///host.com`), but I think this fix is a little cleaner overall. If we keep hitting similar stuff, we could look into alternate fixes.

We could also set some kind of "setup mode" flag and make `getURI()` if it's called during setup mode to detect these during testing. I'd like to hit one more of these before doing that, though.

Test Plan: Reproduced the issue, applied the patch, verified this fixes it.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D8395
2014-03-04 16:11:28 -08:00
..
PhabricatorSetupCheck.php Config option to ignore setup issues 2013-02-22 10:08:20 -08:00
PhabricatorSetupCheckAPC.php Detect and warn about APC 3.1.14 / 3.1.15 2013-07-10 13:20:00 -07:00
PhabricatorSetupCheckAuth.php Don't actually construct auth providers when checking for their existence 2014-03-04 16:11:28 -08:00
PhabricatorSetupCheckBaseURI.php Consolidate HTTP header access 2013-02-09 15:01:57 -08:00
PhabricatorSetupCheckBinaries.php Fix a spelling mistake in warning message for missing 'diff' binary 2013-09-26 05:22:23 -07:00
PhabricatorSetupCheckDaemons.php Warn if daemons are not running 2014-01-14 13:22:40 -08:00
PhabricatorSetupCheckDatabase.php Separate missing patches by newlines 2013-07-18 11:31:30 -07:00
PhabricatorSetupCheckExtensions.php Require mysql or mysqli, not both 2013-03-03 11:37:53 -08:00
PhabricatorSetupCheckExtraConfig.php Use CustomField, not AuxiliaryField, to power RevisionView 2014-02-27 11:06:14 -08:00
PhabricatorSetupCheckFileinfo.php Add a setup warning about missing 'fileinfo' 2013-05-17 10:00:40 -07:00
PhabricatorSetupCheckGD.php Migrate max_allowed_packet and GD checks to new setup stuff 2013-01-19 08:41:45 -08:00
PhabricatorSetupCheckImagemagick.php Various linter fixes. 2014-02-26 12:44:58 -08:00
PhabricatorSetupCheckInvalidConfig.php Repair invalid configuration by setting values back to defaults 2013-01-17 16:25:38 -08:00
PhabricatorSetupCheckMail.php Fixed T2630 2013-04-10 13:11:22 -07:00
PhabricatorSetupCheckMySQL.php Recommend STRICT_ALL_TABLES for every install, not just development installs 2014-02-23 10:59:59 -08:00
PhabricatorSetupCheckPath.php Validate all components of $PATH configuration 2013-06-28 17:23:36 -07:00
PhabricatorSetupCheckPHPConfig.php Whitelist blacklisting pcntl_ functions for setup checks so Debian installs don't fatal instantly 2013-08-13 12:23:29 -07:00
PhabricatorSetupCheckPygment.php Fixed T2630 2013-04-10 13:11:22 -07:00
PhabricatorSetupCheckRepositories.php Raise a setup warning for missing or invalid local repository directory 2013-10-30 13:07:09 -07:00
PhabricatorSetupCheckStorage.php Add a setup issue to warn about an unconfigured upload limit 2013-06-12 05:49:41 -07:00
PhabricatorSetupCheckTimezone.php Make timezone configuration impossible to get wrong 2013-01-19 08:38:37 -08:00