mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 22:45:51 +01:00
test/html is cause of xss
This commit is contained in:
@@ -135,8 +135,9 @@ trait AccountControllerBase extends AccountManagementControllerBase {
|
||||
get("/:userName/_avatar"){
|
||||
val userName = params("userName")
|
||||
getAccountByUserName(userName).flatMap(_.image).map { image =>
|
||||
contentType = FileUtil.getMimeType(image)
|
||||
new java.io.File(getUserUploadDir(userName), image)
|
||||
outputUploadedRawData(
|
||||
FileUtil.getMimeType(image),
|
||||
new java.io.File(getUserUploadDir(userName), image))
|
||||
} getOrElse {
|
||||
contentType = "image/png"
|
||||
Thread.currentThread.getContextClassLoader.getResourceAsStream("noimage.png")
|
||||
|
||||
Reference in New Issue
Block a user