mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-29 17:00:59 +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:
parent
ce7c2097b2
commit
809c7fb4f3
1 changed files with 5 additions and 0 deletions
|
@ -372,6 +372,11 @@ final class PhabricatorOwnersPackageQuery
|
||||||
$include = false;
|
$include = false;
|
||||||
|
|
||||||
foreach ($package->getPaths() as $package_path) {
|
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);
|
$strength = $package_path->getPathMatchStrength($path);
|
||||||
if ($strength > $best_match) {
|
if ($strength > $best_match) {
|
||||||
$best_match = $strength;
|
$best_match = $strength;
|
||||||
|
|
Loading…
Reference in a new issue