1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 21:07:03 +00:00

fix CVE-2020-5398

reported through security issue report by @motoyasu-saburi
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-07-21 13:28:44 +03:00
parent 94540fa664
commit 04ef581c02
2 changed files with 26 additions and 2 deletions

View File

@@ -321,7 +321,7 @@ func FileServer(fs http.FileSystem, options DirOptions) context.Handler {
destName = nameFunc(destName)
}
ctx.ResponseWriter().Header().Set(context.ContentDispositionHeaderKey, "attachment;filename="+destName)
ctx.ResponseWriter().Header().Set(context.ContentDispositionHeaderKey, context.MakeDisposition(destName))
}
// the encoding saved from the negotiation.