Page MenuHomePhorge

D25826.1731967631.diff
No OneTemporary

D25826.1731967631.diff

diff --git a/src/applications/diffusion/controller/DiffusionServeController.php b/src/applications/diffusion/controller/DiffusionServeController.php
--- a/src/applications/diffusion/controller/DiffusionServeController.php
+++ b/src/applications/diffusion/controller/DiffusionServeController.php
@@ -492,6 +492,9 @@
return $result;
}
+ /**
+ * @return bool
+ */
private function isReadOnlyRequest(
PhabricatorRepository $repository) {
$request = $this->getRequest();
@@ -652,6 +655,9 @@
return id(new DiffusionGitResponse())->setGitData($stdout);
}
+ /**
+ * @return string
+ */
private function getRequestDirectoryPath(PhabricatorRepository $repository) {
$request = $this->getRequest();
$request_path = $request->getRequestURI()->getPath();
@@ -659,7 +665,11 @@
$info = PhabricatorRepository::parseRepositoryServicePath(
$request_path,
$repository->getVersionControlSystem());
- $base_path = $info['path'];
+ if ($info) {
+ $base_path = $info['path'];
+ } else {
+ $base_path = '';
+ }
// For Git repositories, strip an optional directory component if it
// isn't the name of a known Git resource. This allows users to clone
diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php
--- a/src/applications/repository/storage/PhabricatorRepository.php
+++ b/src/applications/repository/storage/PhabricatorRepository.php
@@ -604,6 +604,9 @@
return "/R{$id}:{$identifier}";
}
+ /**
+ * @return array|null
+ */
public static function parseRepositoryServicePath($request_path, $vcs) {
$is_git = ($vcs == PhabricatorRepositoryType::REPOSITORY_TYPE_GIT);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 22:07 (15 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
976943
Default Alt Text
D25826.1731967631.diff (1 KB)

Event Timeline