From: Colby Sollars Date: Tue, 16 Feb 2021 22:50:20 +0000 (-0700) Subject: On wall_attach, file extension to mimetype matching now breaks the filename at the... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5151a82d5e040ca688bf6f765632f079e48972f4;p=friendica.git On wall_attach, file extension to mimetype matching now breaks the filename at the last . character instead of the first --- diff --git a/src/Util/Mimetype.php b/src/Util/Mimetype.php index bd87d30898..5b50324b41 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)) {