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:57:12 +0000 |
commit | c44656aa0a617c7ec91a10389794c947f90be018 (patch) | |
tree | c90f9cd4151cc3ef85bcf5841d1a1ccb130d5230 | |
parent | 5a27942497a5ffe24c3c4f5c8b22b78d89bb17bd (diff) | |
download | nextcloud-server-backport/51405/stable29.tar.gz nextcloud-server-backport/51405/stable29.zip |
fix(mimetypes): drop `tar.gz` and `tar.bz2` and adjust `tgz`backport/51405/stable29
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 6fe7db76318..fbe470cc1ae 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -76,7 +76,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 ca515b2c578..7fcc2dcb25e 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -187,14 +187,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"], |