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
F2893481: D25826.1737224994.diff
Fri, Jan 17, 18:29
F2888571: D25826.1737187703.diff
Fri, Jan 17, 08:08
F2875327: D25826.1736978873.diff
Tue, Jan 14, 22:07
F2875326: D25826.1736978871.diff
Tue, Jan 14, 22:07
F2875143: D25826.1736972294.diff
Tue, Jan 14, 20:18
F2875110: D25826.1736971092.diff
Tue, Jan 14, 19:58
F2873003: D25826.1736907289.diff
Tue, Jan 14, 02:14
F2871161: D25826.1736838379.diff
Mon, Jan 13, 07:06
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