Show More
@@ -229,13 +229,19 b' class RepoAppView(BaseAppView):' | |||
|
229 | 229 | |
|
230 | 230 | return c |
|
231 | 231 | |
|
232 | def _get_f_path(self, matchdict, default=None): | |
|
232 | def _get_f_path_unchecked(self, matchdict, default=None): | |
|
233 | """ | |
|
234 | Should only be used by redirects, everything else should call _get_f_path | |
|
235 | """ | |
|
233 | 236 | f_path = matchdict.get('f_path') |
|
234 | 237 | if f_path: |
|
235 | 238 | # fix for multiple initial slashes that causes errors for GIT |
|
236 |
return |
|
|
239 | return f_path.lstrip('/') | |
|
237 | 240 | |
|
238 | return self.path_filter.assert_path_permissions(default) | |
|
241 | return default | |
|
242 | ||
|
243 | def _get_f_path(self, matchdict, default=None): | |
|
244 | return self.path_filter.assert_path_permissions(self._get_f_path_unchecked(matchdict, default)) | |
|
239 | 245 | |
|
240 | 246 | |
|
241 | 247 | class PathFilter(object): |
@@ -462,7 +462,7 b' class RepoFilesView(RepoAppView):' | |||
|
462 | 462 | """ |
|
463 | 463 | Kept only to make OLD links work |
|
464 | 464 | """ |
|
465 | f_path = self._get_f_path(self.request.matchdict) | |
|
465 | f_path = self._get_f_path_unchecked(self.request.matchdict) | |
|
466 | 466 | diff1 = self.request.GET.get('diff1', '') |
|
467 | 467 | diff2 = self.request.GET.get('diff2', '') |
|
468 | 468 |
General Comments 0
You need to be logged in to leave comments.
Login now