diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/GitBlit.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java index efdaad1e..e47c4c69 100644 --- a/src/main/java/com/gitblit/GitBlit.java +++ b/src/main/java/com/gitblit/GitBlit.java @@ -1557,6 +1557,10 @@ public class GitBlit implements ServletContextListener { * @return repository or null */ public Repository getRepository(String repositoryName, boolean logError) { + // Decode url-encoded repository name (issue-278) + // http://stackoverflow.com/questions/17183110 + repositoryName = repositoryName.replace("%7E", "~").replace("%7e", "~"); + if (isCollectingGarbage(repositoryName)) { logger.warn(MessageFormat.format("Rejecting request for {0}, busy collecting garbage!", repositoryName)); return null; @@ -1656,6 +1660,10 @@ public class GitBlit implements ServletContextListener { * @return repository model or null */ public RepositoryModel getRepositoryModel(String repositoryName) { + // Decode url-encoded repository name (issue-278) + // http://stackoverflow.com/questions/17183110 + repositoryName = repositoryName.replace("%7E", "~").replace("%7e", "~"); + if (!repositoryListCache.containsKey(repositoryName)) { RepositoryModel model = loadRepositoryModel(repositoryName); if (model == null) { |