Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15457644
D10701.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
D10701.diff
View Options
diff --git a/src/applications/differential/customfield/DifferentialRevisionIDField.php b/src/applications/differential/customfield/DifferentialRevisionIDField.php
--- a/src/applications/differential/customfield/DifferentialRevisionIDField.php
+++ b/src/applications/differential/customfield/DifferentialRevisionIDField.php
@@ -47,22 +47,26 @@
$this->revisionID = $value;
}
- private static function parseRevisionIDFromURI($uri) {
- $path = id(new PhutilURI($uri))->getPath();
+ private static function parseRevisionIDFromURI($uri_string) {
+ $uri = new PhutilURI($uri_string);
+ $path = $uri->getPath();
$matches = null;
if (preg_match('#^/D(\d+)$#', $path, $matches)) {
$id = (int)$matches[1];
+
+ $prod_uri = new PhutilURI(PhabricatorEnv::getProductionURI('/D'.$id));
+
// Make sure the URI is the same as our URI. Basically, we want to ignore
// commits from other Phabricator installs.
- if ($uri == PhabricatorEnv::getProductionURI('/D'.$id)) {
+ if ($uri->getDomain() == $prod_uri->getDomain()) {
return $id;
}
$allowed_uris = PhabricatorEnv::getAllowedURIs('/D'.$id);
foreach ($allowed_uris as $allowed_uri) {
- if ($uri == $allowed_uri) {
+ if ($uri_string == $allowed_uri) {
return $id;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 5:31 PM (21 h, 19 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7652958
Default Alt Text
D10701.diff (1 KB)
Attached To
Mode
D10701: Differental - match "Revision ID:" uri value on domain only
Attached
Detach File
Event Timeline
Log In to Comment