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
F3311151: D25826.1743200894.diff
Thu, Mar 27, 22:28
F3309204: D25826.1743183493.diff
Thu, Mar 27, 17:38
F3307933: D25826.1743154514.diff
Thu, Mar 27, 09:35
F3307932: D25826.1743154512.diff
Thu, Mar 27, 09:35
F3307921: D25826.1743154138.diff
Thu, Mar 27, 09:28
F3307919: D25826.1743154134.diff
Thu, Mar 27, 09:28
F3306508: D25826.1743129211.diff
Thu, Mar 27, 02:33
F3291771: D25826.1742881566.diff
Mon, Mar 24, 05:46
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