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
F3291771: D25826.1742881566.diff
Mon, Mar 24, 05:46
F3290780: D25826.1742872561.diff
Mon, Mar 24, 03:16
F3290583: D25826.1742869151.diff
Mon, Mar 24, 02:19
F3289512: D25826.1742848636.diff
Sun, Mar 23, 20:37
F3287269: D25826.1742818633.diff
Sun, Mar 23, 12:17
F3285255: D25826.1742796393.diff
Sun, Mar 23, 06:06
F3283284: D25826.1742745927.diff
Sat, Mar 22, 16:05
F3254945: D25826.1742488163.diff
Wed, Mar 19, 16:29
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
Branch
bogusServiceParamExc
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1602
Build 1602: arc lint + arc unit