diff --git a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php --- a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php +++ b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php @@ -97,8 +97,9 @@ // TODO: This is pretty hideous. $slug_map = array(); foreach ($slugs as $slug) { + $normal = rtrim(PhabricatorSlug::normalize($slug), '/'); foreach ($projects as $project) { - if (in_array($slug, $project['slugs'])) { + if (in_array($normal, $project['slugs'])) { $slug_map[$slug] = $project['phid']; } } diff --git a/src/applications/project/query/PhabricatorProjectQuery.php b/src/applications/project/query/PhabricatorProjectQuery.php --- a/src/applications/project/query/PhabricatorProjectQuery.php +++ b/src/applications/project/query/PhabricatorProjectQuery.php @@ -266,10 +266,15 @@ } if ($this->slugs) { + $slugs = array(); + foreach ($this->slugs as $slug) { + $slugs[] = rtrim(PhabricatorSlug::normalize($slug), '/'); + } + $where[] = qsprintf( $conn_r, 'slug.slug IN (%Ls)', - $this->slugs); + $slugs); } if ($this->phrictionSlugs) {