mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
fix encoding and decoding for branches including slashes
This commit is contained in:
@@ -14,6 +14,7 @@ import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.io.IOException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import static sonia.scm.ContextEntry.ContextBuilder.entity;
|
||||
import static sonia.scm.NotFoundException.notFound;
|
||||
@@ -57,7 +58,7 @@ public class SourceRootResource {
|
||||
BrowseCommandBuilder browseCommand = repositoryService.getBrowseCommand();
|
||||
browseCommand.setPath(path);
|
||||
if (revision != null && !revision.isEmpty()) {
|
||||
browseCommand.setRevision(revision);
|
||||
browseCommand.setRevision(URLDecoder.decode(revision, "UTF-8"));
|
||||
}
|
||||
browseCommand.setDisableCache(true);
|
||||
BrowserResult browserResult = browseCommand.getBrowserResult();
|
||||
|
||||
Reference in New Issue
Block a user