mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-16 02:15:50 +01:00
Merge pull request #615 from team-lab/fix/xss-by-raw-html
fix/xss by raw html
This commit is contained in:
@@ -214,8 +214,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
||||
if(raw){
|
||||
// Download
|
||||
defining(JGitUtil.getContentFromId(git, objectId, false).get){ bytes =>
|
||||
contentType = FileUtil.getContentType(path, bytes)
|
||||
bytes
|
||||
outputUploadedRawData(FileUtil.getContentType(path, bytes), bytes)
|
||||
}
|
||||
} else {
|
||||
repo.html.blob(id, repository, path.split("/").toList, JGitUtil.getContentInfo(git, path, objectId),
|
||||
|
||||
Reference in New Issue
Block a user