Merge pull request #615 from team-lab/fix/xss-by-raw-html

fix/xss by raw html
This commit is contained in:
Naoki Takezoe
2015-02-01 12:44:15 +09:00
5 changed files with 16 additions and 8 deletions

View File

@@ -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),