Page MenuHomePhorge

Avoid RuntimeException passing bogus "service" parameter to Diffusion commit view
ClosedPublic

Authored by aklapper on Oct 1 2024, 15:10.
Tags
None
Referenced Files
F3494035: D25826.1744786770.diff
Tue, Apr 15, 06:59
F3387844: D25826.1744442538.diff
Fri, Apr 11, 07:22
F3375289: D25826.1744305585.diff
Wed, Apr 9, 17:19
F3373730: D25826.1744275362.diff
Wed, Apr 9, 08:56
F3372667: D25826.1744250807.diff
Wed, Apr 9, 02:06
F3368973: D25826.1744212510.diff
Tue, Apr 8, 15:28
F3368513: D25826.1744209501.diff
Tue, Apr 8, 14:38
F3362326: D25826.1744077515.diff
Mon, Apr 7, 01:58
Tokens
"Yellow Medal" token, awarded by 20after4.

Details

Summary

PhabricatorRepository::parseRepositoryServicePath() can return null per https://we.phorge.it/source/phorge/browse/master/src/applications/repository/storage/PhabricatorRepository.php;123831b53fb7572cba11e9c990dcb9d247614890$635, thus make the code in DiffusionServeController:getRequestDirectoryPath() at least not crash when handling null and instead fall back to serving a "403 This repository is read-only over HTTP."

There is probably a cleaner approach which I happily leave to any future person willing to figure it out.

Closes T15944

Test Plan

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable