Show More
@@ -104,7 +104,7 b' class HomeView(BaseAppView):' | |||
|
104 | 104 | def _get_repo_list(self, name_contains=None, repo_type=None, limit=20): |
|
105 | 105 | allowed_ids = self._rhodecode_user.repo_acl_ids( |
|
106 | 106 | ['repository.read', 'repository.write', 'repository.admin'], |
|
107 | cache=False, name_filter=name_contains) | |
|
107 | cache=False, name_filter=name_contains) or [-1] | |
|
108 | 108 | |
|
109 | 109 | query = Repository.query()\ |
|
110 | 110 | .order_by(func.length(Repository.repo_name))\ |
@@ -139,7 +139,7 b' class HomeView(BaseAppView):' | |||
|
139 | 139 | def _get_repo_group_list(self, name_contains=None, limit=20): |
|
140 | 140 | allowed_ids = self._rhodecode_user.repo_group_acl_ids( |
|
141 | 141 | ['group.read', 'group.write', 'group.admin'], |
|
142 | cache=False, name_filter=name_contains) | |
|
142 | cache=False, name_filter=name_contains) or [-1] | |
|
143 | 143 | |
|
144 | 144 | query = RepoGroup.query()\ |
|
145 | 145 | .order_by(func.length(RepoGroup.group_name))\ |
@@ -122,6 +122,11 b' def in_filter_generator(qry, items, limi' | |||
|
122 | 122 | *in_filter_generator(Repository.repo_id, range(100000)) |
|
123 | 123 | )).count() |
|
124 | 124 | """ |
|
125 | if not items: | |
|
126 | # empty list will cause empty query which might cause security issues | |
|
127 | # this can lead to hidden unpleasant results | |
|
128 | items = [-1] | |
|
129 | ||
|
125 | 130 | parts = [] |
|
126 | 131 | for chunk in xrange(0, len(items), limit): |
|
127 | 132 | parts.append( |
General Comments 0
You need to be logged in to leave comments.
Login now