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
F4046153: D25826.1746737321.diff
Wed, May 7, 20:48
F4011808: D25826.1746626702.diff
Tue, May 6, 14:05
F3828360: D25826.1746058002.diff
Wed, Apr 30, 00:06
F3783546: D25826.1745907639.diff
Mon, Apr 28, 06:20
F3686387: D25826.1745578213.diff
Thu, Apr 24, 10:50
F3681334: D25826.1745557777.diff
Thu, Apr 24, 05:09
F3680936: D25826.1745555926.diff
Thu, Apr 24, 04:38
F3675261: D25826.1745505117.diff
Wed, Apr 23, 14:31
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