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:17 +0000 |
commit | 2e9fadfcd58979020aa38d614787b2ffe67fdd5c (patch) | |
tree | 4d9836a03c4282b429e32cf5cda513307db53f50 | |
parent | 34003a026ad758f32b2da9b093fae78b1ebb90b4 (diff) | |
download | nextcloud-server-2e9fadfcd58979020aa38d614787b2ffe67fdd5c.tar.gz nextcloud-server-2e9fadfcd58979020aa38d614787b2ffe67fdd5c.zip |
fix(mimetypes): drop `tar.gz` and `tar.bz2` and adjust `tgz`backport/51405/stable30
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"], |