From 5151a82d5e040ca688bf6f765632f079e48972f4 Mon Sep 17 00:00:00 2001 From: Colby Sollars Date: Tue, 16 Feb 2021 15:50:20 -0700 Subject: [PATCH] On wall_attach, file extension to mimetype matching now breaks the filename at the last . character instead of the first --- src/Util/Mimetype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/Mimetype.php b/src/Util/Mimetype.php index bd87d3089..5b50324b4 100644 --- a/src/Util/Mimetype.php +++ b/src/Util/Mimetype.php @@ -1088,7 +1088,7 @@ class Mimetype 'zsh' => 'text/x-script.zsh' ]; - $dot = strpos($filename, '.'); + $dot = strrpos($filename, '.'); if ($dot !== false) { $ext = strtolower(substr($filename, $dot + 1)); if (array_key_exists($ext, $mime_types)) {