Paul Martin
2016-04-27 c2188a840bc4153ae92112b04b2e06a90d3944aa
src/main/java/com/gitblit/servlet/DownloadZipFilter.java
@@ -54,11 +54,14 @@
   @Override
   protected String extractRepositoryName(String url) {
      int a = url.indexOf("r=");
      String repository = url.substring(a + 2);
      if (repository.indexOf('&') > -1) {
         repository = repository.substring(0, repository.indexOf('&'));
      if (a > -1) {
         String repository = url.substring(a + 2);
         if (repository.indexOf('&') > -1) {
            repository = repository.substring(0, repository.indexOf('&'));
         }
         return repository;
      }
      return repository;
      return null;
   }
   /**
@@ -78,7 +81,7 @@
    * @return true if the filter allows repository creation
    */
   @Override
   protected boolean isCreationAllowed() {
   protected boolean isCreationAllowed(String action) {
      return false;
   }
@@ -87,10 +90,11 @@
    *
    * @param repository
    * @param action
    * @param method
    * @return true if the action may be performed
    */
   @Override
   protected boolean isActionAllowed(RepositoryModel repository, String action) {
   protected boolean isActionAllowed(RepositoryModel repository, String action, String method) {
      return true;
   }
@@ -99,10 +103,11 @@
    *
    * @param repository
    * @param action
    * @param method
    * @return true if authentication required
    */
   @Override
   protected boolean requiresAuthentication(RepositoryModel repository, String action) {
   protected boolean requiresAuthentication(RepositoryModel repository, String action, String method) {
      return repository.accessRestriction.atLeast(AccessRestrictionType.VIEW);
   }