Browse Source

Log attachment blocked events (#3615)

Include both a log entry and the blocked mime type in the gitea log when
an attachment upload is blocked.

Chosen log level is info; this may need to be dialed down to trace.
tags/v1.5.0-dev
Mahmoud Al-Qudsi Lunny Xiao 7 years ago
parent
commit
721c20cdf6
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      routers/repo/attachment.go

+ 1
- 0
routers/repo/attachment.go View File

@@ -55,6 +55,7 @@ func UploadAttachment(ctx *context.Context) {
}

if !allowed {
log.Info("Attachment with type %s blocked from upload", fileType)
ctx.Error(400, ErrFileTypeForbidden.Error())
return
}


Loading…
Cancel
Save