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
F2977780: D25826.1739653322.diff
Fri, Feb 14, 21:02
F2977779: D25826.1739653321.diff
Fri, Feb 14, 21:02
F2977733: D25826.1739649500.diff
Fri, Feb 14, 19:58
F2977690: D25826.1739645025.diff
Fri, Feb 14, 18:43
F2950219: D25826.1738736279.diff
Tue, Feb 4, 06:17
F2945281: D25826.1738305667.diff
Thu, Jan 30, 06:41
F2943095: D25826.1738163355.diff
Tue, Jan 28, 15:09
F2921747: D25826.1737557460.diff
Tue, Jan 21, 14:51
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