From f702740877bd8e409ea43a239c222c224679cc0a Mon Sep 17 00:00:00 2001 From: iasdeoupxe <39667843+iasdeoupxe@users.noreply.github.com> Date: Sat, 10 Jan 2026 14:46:33 +0100 Subject: [PATCH 1/2] feat: Add mimetype aliases/mapping/names for .toml and .ovpn Signed-off-by: iasdeoupxe <39667843+iasdeoupxe@users.noreply.github.com> --- resources/config/mimetypealiases.dist.json | 2 ++ resources/config/mimetypemapping.dist.json | 4 +++- resources/config/mimetypenames.dist.json | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index 209031c6b8a92..abbacc9a59231 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -27,6 +27,7 @@ "application/octet-stream": "file", "application/postscript": "image", "application/rss+xml": "application/xml", + "application/toml": "text/code", "application/vnd.android.package-archive": "package/x-generic", "application/vnd.excalidraw+json": "whiteboard", "application/vnd.garmin.tcx+xml": "location", @@ -92,6 +93,7 @@ "application/x-iwork-numbers-sffnumbers": "x-office/spreadsheet", "application/x-iwork-pages-sffpages": "x-office/document", "application/x-mobipocket-ebook": "text", + "application/x-openvpn-profile": "text", "application/x-perl": "text/code", "application/x-photoshop": "image", "application/x-php": "text/code", diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index 31fd566993baf..f0d4cc7243598 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -152,6 +152,7 @@ "otp": ["application/vnd.oasis.opendocument.presentation-template"], "ots": ["application/vnd.oasis.opendocument.spreadsheet-template"], "ott": ["application/vnd.oasis.opendocument.text-template"], + "ovpn": ["application/x-openvpn-profile", "text/plain"], "pages": ["application/x-iwork-pages-sffpages"], "pdf": ["application/pdf"], "pef": ["image/x-dcraw"], @@ -194,12 +195,13 @@ "tbz2": ["application/x-bzip2"], "tcx": ["application/vnd.garmin.tcx+xml"], "tex": ["application/x-tex"], + "text": ["text/plain"], "tga": ["image/tga"], "tgz": ["application/gzip"], "tif": ["image/tiff"], "tiff": ["image/tiff"], + "toml": ["application/toml", "text/code"], "ttf": ["application/font-sfnt"], - "text": ["text/plain"], "txt": ["text/plain"], "url": ["application/internet-shortcut"], "vcard": ["text/vcard"], diff --git a/resources/config/mimetypenames.dist.json b/resources/config/mimetypenames.dist.json index 6d0bbfe48e1e4..53dc763502cec 100644 --- a/resources/config/mimetypenames.dist.json +++ b/resources/config/mimetypenames.dist.json @@ -34,6 +34,7 @@ "application/postscript": "PostScript document", "application/rss+xml": "RSS summary", "application/sgf": "", + "application/toml": "TOML configuration file", "application/vnd.android.package-archive": "Android package", "application/vnd.excalidraw+json": "", "application/vnd.garmin.tcx+xml": "", @@ -105,6 +106,7 @@ "application/x-ms-dos-executable": "", "application/x-msdos-program": "", "application/x-msi": "Windows Installer package", + "application/x-openvpn-profile": "OpenVPN connection profile", "application/x-perl": "Perl script", "application/x-photoshop": "", "application/x-php": "PHP script", From 2871bc9f91db5716b8d31cb7d57b82206b2bdffe Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Mon, 19 Jan 2026 18:50:09 +0100 Subject: [PATCH 2/2] fix(repair): Add toml and ovpn mime type repair step Signed-off-by: Andy Scherzinger --- lib/private/Repair/RepairMimeTypes.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 8afaca9c3c615..2859477863678 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -362,7 +362,18 @@ private function introduceTextType(): IResult|int|null { return $this->updateMimetypes($updatedMimetypes); } + /** + * @throws Exception + * @since 33.0.0 + */ + private function introduceTomlAndOvpnType(): IResult|int|null { + $updatedMimetypes = [ + 'ovpn' => 'application/x-openvpn-profile', + 'toml' => 'application/toml', + ]; + return $this->updateMimetypes($updatedMimetypes); + } /** * Check if there are any migrations available @@ -482,6 +493,10 @@ public function run(IOutput $output): void { $output->info('Fixed text mime type'); } + if (version_compare($mimeTypeVersion, '33.0.0.0', '<') && $this->introduceTomlAndOvpnType()) { + $output->info('Fixed toml and ovpn mime type'); + } + if (!$this->dryRun) { $this->appConfig->setValueString('files', 'mimetype_version', $serverVersion); }