Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408162
D16188.id38943.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16188.id38943.diff
View Options
diff --git a/src/workflow/ArcanistInstallCertificateWorkflow.php b/src/workflow/ArcanistInstallCertificateWorkflow.php
--- a/src/workflow/ArcanistInstallCertificateWorkflow.php
+++ b/src/workflow/ArcanistInstallCertificateWorkflow.php
@@ -196,14 +196,31 @@
$uri = $conduit_uri;
}
+ $example = 'https://phabricator.example.com/';
+
$uri_object = new PhutilURI($uri);
- if (!$uri_object->getProtocol() || !$uri_object->getDomain()) {
+ $protocol = $uri_object->getProtocol();
+ if (!$protocol || !$uri_object->getDomain()) {
throw new ArcanistUsageException(
pht(
'Server URI "%s" must include a protocol and domain. It should be '.
'in the form "%s".',
$uri,
- 'https://phabricator.example.com/'));
+ $example));
+ }
+
+ $protocol = $uri_object->getProtocol();
+ switch ($protocol) {
+ case 'http':
+ case 'https':
+ break;
+ default:
+ throw new ArcanistUsageException(
+ pht(
+ 'Server URI "%s" must include the "http" or "https" protocol. '.
+ 'It should be in the form "%s".',
+ $uri,
+ $example));
}
$uri_object->setPath('/api/');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 9:29 PM (2 d, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7224902
Default Alt Text
D16188.id38943.diff (1 KB)
Attached To
Mode
D16188: Validate Arcanist install-certificate URIs more carefully
Attached
Detach File
Event Timeline
Log In to Comment