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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user