Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
git,svn: Respond 404 for unsupported repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi EungJun committed Aug 11, 2014
1 parent a133725 commit bb52e67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/GitApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public static Result service(String ownerName, String projectName, String servic
return notFound();
}

if (!project.vcs.equals(RepositoryService.VCS_GIT)) {
return notFound();
}

models.User user = UserApp.currentUser();

if (!isAllowed(project, service)) {
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/SvnApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public static Result service() throws ServletException, IOException, Interrupted
return notFound();
}

if (!project.vcs.equals(RepositoryService.VCS_SUBVERSION)) {
return notFound();
}

PlayRepository repository = RepositoryService.getRepository(project);
if (!AccessControl.isAllowed(currentUser, repository.asResource(),
getRequestedOperation(request().method()))) {
Expand Down

0 comments on commit bb52e67

Please sign in to comment.