Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorSecuritySetupCheck.php
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | protected function executeChecks() { | ||||
$file_domain = PhabricatorEnv::getEnvConfig($file_key); | $file_domain = PhabricatorEnv::getEnvConfig($file_key); | ||||
if (!$file_domain) { | if (!$file_domain) { | ||||
$doc_href = PhabricatorEnv::getDoclink('Configuring a File Domain'); | $doc_href = PhabricatorEnv::getDoclink('Configuring a File Domain'); | ||||
$this->newIssue('security.'.$file_key) | $this->newIssue('security.'.$file_key) | ||||
->setName(pht('Alternate File Domain Not Configured')) | ->setName(pht('Alternate File Domain Not Configured')) | ||||
->setSummary( | ->setSummary( | ||||
pht( | pht( | ||||
'Increase security (and improve performance) by configuring '. | 'Improve security by configuring an alternate file domain.')) | ||||
'a CDN or alternate file domain.')) | |||||
->setMessage( | ->setMessage( | ||||
pht( | pht( | ||||
'Phabricator is currently configured to serve user uploads '. | 'Phabricator is currently configured to serve user uploads '. | ||||
'directly from the same domain as other content. This is a '. | 'directly from the same domain as other content. This is a '. | ||||
'security risk.'. | 'security risk.'. | ||||
"\n\n". | "\n\n". | ||||
'Configure a CDN (or alternate file domain) to eliminate this '. | 'Configure a CDN (or alternate file domain) to eliminate this '. | ||||
'risk. Using a CDN will also improve performance. See the '. | 'risk. Using a CDN will also improve performance. See the '. | ||||
'guide below for instructions.')) | 'guide below for instructions.')) | ||||
->addPhabricatorConfig($file_key) | ->addPhabricatorConfig($file_key) | ||||
->addLink( | ->addLink( | ||||
$doc_href, | $doc_href, | ||||
pht('Configuration Guide: Configuring a File Domain')); | pht('Configuration Guide: Configuring a File Domain')); | ||||
} | } | ||||
} | } | ||||
} | } |