diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-03-11 21:35:33 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-03-12 07:51:11 +0000 |
commit | d8c0852f38f7e6d600ab25f97b4b6494984a211b (patch) | |
tree | a5ec70bde22ac81d242cffe2ad9c6a82257a43db | |
parent | aebc0806fc2a450ba354243de35aea85f63af7f2 (diff) | |
download | nextcloud-server-d8c0852f38f7e6d600ab25f97b4b6494984a211b.tar.gz nextcloud-server-d8c0852f38f7e6d600ab25f97b4b6494984a211b.zip |
fix(mimetypes): drop `tar.gz` and `tar.bz2` and adjust `tgz`
1. mimetypes with a dot do not work with our mime detector (only checks
last dot).
2. all of those files are tar files compressed as gzip / bzip2 so the
real mimetype of the file is the compression not the tar.
We could at max. set mime to `application/x-tar+gzip`.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r-- | resources/config/mimetypealiases.dist.json | 1 | ||||
-rw-r--r-- | resources/config/mimetypemapping.dist.json | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index 1837c242ded..970050df1b6 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -81,7 +81,6 @@ "application/x-7z-compressed": "package/x-generic", "application/x-bzip2": "package/x-generic", "application/x-cbr": "text", - "application/x-compressed": "package/x-generic", "application/x-dcraw": "image", "application/x-deb": "package/x-generic", "application/x-fictionbook+xml": "text", diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index 705fed26f92..7a4cc245b98 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -188,14 +188,12 @@ "srf": ["image/x-dcraw"], "svg": ["image/svg+xml", "text/plain"], "swf": ["application/x-shockwave-flash", "application/octet-stream"], - "tar.bz2": ["application/x-bzip2"], - "tar.gz": ["application/x-compressed"], "tar": ["application/x-tar"], "tbz2": ["application/x-bzip2"], "tcx": ["application/vnd.garmin.tcx+xml"], "tex": ["application/x-tex"], "tga": ["image/tga"], - "tgz": ["application/x-compressed"], + "tgz": ["application/gzip"], "tif": ["image/tiff"], "tiff": ["image/tiff"], "ttf": ["application/font-sfnt"], |