summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-03-19 16:48:44 -0400
committerGitHub <noreply@github.com>2023-03-19 16:48:44 -0400
commit4730ed18f1e28c07d9fdf5c50d99b5a8197c4fdd (patch)
tree0ddf6184b1a280a811111d4305e04f345a076df0 /modules/setting
parent937996c74c3d78a2164817ad7b23378c563d669a (diff)
downloadgitea-4730ed18f1e28c07d9fdf5c50d99b5a8197c4fdd.tar.gz
gitea-4730ed18f1e28c07d9fdf5c50d99b5a8197c4fdd.zip
Add `.patch` to `attachment.ALLOWED_TYPES` (#23580) (#23582)
Backport #23580 by @silverwind Updated this default to GitHub's latest, adding the `.patch` file extension to allowed types. Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/attachment.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/attachment.go b/modules/setting/attachment.go
index 8b6eb9fd7a..4d4b8e3b02 100644
--- a/modules/setting/attachment.go
+++ b/modules/setting/attachment.go
@@ -26,7 +26,7 @@ func loadAttachmentFrom(rootCfg ConfigProvider) {
Attachment.Storage = getStorage(rootCfg, "attachments", storageType, sec)
- Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip")
+ Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip")
Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4)
Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5)
Attachment.Enabled = sec.Key("ENABLED").MustBool(true)