Skip to content

Commit

Permalink
Guard against additional segments
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Jan 23, 2025
1 parent 10ae91c commit ed1f624
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Stache/Repositories/TermRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public function findByUri(string $uri, ?string $site = null): ?Term
return null;
}

if ($term->uri() !== '/'.$uri) {
return null;
}

return $term->collection($collection);
}

Expand Down

0 comments on commit ed1f624

Please sign in to comment.