Skip to content

Commit

Permalink
Harden collection handle check in Taxonomy::findByUri to prevent part…
Browse files Browse the repository at this point in the history
…ial matches
  • Loading branch information
ryanmitchell committed Dec 2, 2023
1 parent 45590ce commit 4299a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stache/Repositories/TaxonomyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function findByUri(string $uri, string $site = null): ?Taxonomy
return true;
}

return Str::startsWith($uri, '/'.$collection->handle());
return Str::startsWith($uri.'/', '/'.$collection->handle().'/');
});

if ($collection) {
Expand Down

0 comments on commit 4299a21

Please sign in to comment.