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
F3362326: D25826.1744077515.diff
Mon, Apr 7, 01:58
F3346957: D25826.1743709991.diff
Wed, Apr 2, 19:53
F3339362: D25826.1743618487.diff
Tue, Apr 1, 18:28
F3334735: D25826.1743553452.diff
Tue, Apr 1, 00:24
F3330130: D25826.1743483982.diff
Mon, Mar 31, 05:06
F3323654: D25826.1743388194.diff
Sun, Mar 30, 02:29
F3320653: D25826.1743332859.diff
Sat, Mar 29, 11:07
F3320264: D25826.1743326677.diff
Sat, Mar 29, 09:24
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