Fix bug in miemetype name comparator

The code was removing the first matching prefix (x- or x-ms-), which
caused 'x-ms-bmp' to end up as 'ms-bmp'. It should be 'bmp'. Fixed by
reverting the order of tokens in the regexp.
pull/6841/head
Aleksander Machniak 5 years ago
parent 22375170df
commit c25a6cf09b

@ -311,7 +311,7 @@ exit;
*/
function rcmail_mimetype_compare($type1, $type2)
{
$regexp = '~/(x-|x-ms-)~';
$regexp = '~/(x-ms-|x-)~';
$type1 = preg_replace($regexp, '/', $type1);
$type2 = preg_replace($regexp, '/', $type2);

Loading…
Cancel
Save