Permalink
Browse files

fix https://trac-hacks.org/ticket/10792 -- don't trust the search bac…

…kend to only return repos that exist and are authorized to the current request
  • Loading branch information...
1 parent 660fc82 commit 4ba5672c1c97c71811193c74603067c3b2e99b86 @ejucovy ejucovy committed Jan 11, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 multireposearch/search.py
View
3 multireposearch/search.py
@@ -86,6 +86,9 @@ def get_search_results(self, req, query, filters):
for filename, reponame in self.search_backend.find_words(query):
repo = self.env.get_repository(reponame=reponame, authname=req.authname)
+ if repo is None:
+ # @@TODO: log it? ask the search backend to remove the reference?
+ continue
node = repo.get_node(filename)
if node.kind == Node.DIRECTORY:

0 comments on commit 4ba5672

Please sign in to comment.