Homestyx hydra
Diffusion hydra b0bf1c689a9d

Avoid RuntimeException passing bogus "service" parameter to Diffusion commit…

Description

Avoid RuntimeException passing bogus "service" parameter to Diffusion commit view

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: Go to http://phorge.localhost/rABCD0123456789abcdef0123456789abcdef01234567?service=foo

Reviewers: O1 Blessed Committers, 20after4

Reviewed By: O1 Blessed Committers, 20after4

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15944

Differential Revision: https://we.phorge.it/D25826

Details

Provenance
Andre KlapperAuthored on Tue, Oct 1, 11:08 AM
sirocylPushed on Wed, Oct 16, 5:49 AM
Parents
R1:9cd62bdcc432: Fix PHP 8.1 "strlen(null)" exception in SVN commit query without identifier
Branches
Unknown
Tags
Unknown

Event Timeline