From: Vsevolod Stakhov Date: Thu, 7 May 2020 13:38:09 +0000 (+0100) Subject: [Minor] Get rid of numeric string:match in honor of tonumber X-Git-Tag: 2.6~444 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe707d0e5451b8d18e62fcb3d0028e6fc453c2da;p=thirdparty%2Frspamd.git [Minor] Get rid of numeric string:match in honor of tonumber --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 6cf306b2bb..24b88da1d3 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -462,7 +462,7 @@ local function check_mime_type(task) if enc_ext and settings['bad_extensions'][enc_ext] - and not string.match(ext2, '^%d+$') + and not tonumber(ext2) and enc_ext ~= ext2 then task:insert_result(settings['symbol_double_extension'], 2.0, string.format("%s!=%s", ext2, enc_ext))