From e7e8bd8af341719b7cb902c7861ea198f5db43a6 Mon Sep 17 00:00:00 2001 From: Robbert Noordzij Date: Tue, 7 Oct 2014 12:14:27 +0200 Subject: [PATCH] Bug in the rawservlet in extracting the repository out of the path. The offset for finding the next slash should be the current slash + 1, not the last offset + the offset of the current slash. --- src/main/java/com/gitblit/servlet/RawServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/servlet/RawServlet.java b/src/main/java/com/gitblit/servlet/RawServlet.java index 9fb96a5d..ac77646f 100644 --- a/src/main/java/com/gitblit/servlet/RawServlet.java +++ b/src/main/java/com/gitblit/servlet/RawServlet.java @@ -172,7 +172,7 @@ public class RawServlet extends DaggerServlet { } else { repository = path.substring(0, slash); } - offset += ( slash + 1 ); + offset = ( slash + 1 ); r = repositoryManager.getRepository(repository, false); if (repository.equals(path)) { // either only repository in url or no repository found -- 2.39.5