1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 06:20:56 +01:00

Fix an issue where paths could bleed across repos in Owners

Summary:
Ref T8320. I missed this a while ago and then it came to me in a dream.

Only consider paths in the same repo when looking at ownership.

(I think this is rarely reachable in practice.)

Test Plan: Verified that files and commits still listed ownership properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D14022
This commit is contained in:
epriestley 2015-09-01 08:07:06 -07:00
parent ce7c2097b2
commit 809c7fb4f3

View file

@ -372,6 +372,11 @@ final class PhabricatorOwnersPackageQuery
$include = false;
foreach ($package->getPaths() as $package_path) {
if ($package_path->getRepositoryPHID() != $repository_phid) {
// If this path is for some other repository, skip it.
continue;
}
$strength = $package_path->getPathMatchStrength($path);
if ($strength > $best_match) {
$best_match = $strength;