From: Paul Arthur Date: Sun, 9 Jul 2017 23:01:07 +0000 (+0000) Subject: Fix lua_util_is_utf_spoofed logic X-Git-Tag: 1.6.3~3^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf44c3a877a2d2982dc36519cca10203bc6f41f2;p=rspamd.git Fix lua_util_is_utf_spoofed logic When compiled against libicu < 51 the list of allowed characters was set to none, so all strings were flagged as spoofed. Fixes #1689. --- diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c index ef2adfe81..2e98d64fd 100644 --- a/src/lua/lua_util.c +++ b/src/lua/lua_util.c @@ -1973,8 +1973,8 @@ lua_util_is_utf_spoofed (lua_State *L) uspoof_setChecks (spc_sgl, USPOOF_ALL_CHECKS & ~USPOOF_WHOLE_SCRIPT_CONFUSABLE, &uc_err); - uspoof_setAllowedChars (spc_sgl, allowed, &uc_err); #if U_ICU_VERSION_MAJOR_NUM >= 51 + uspoof_setAllowedChars (spc_sgl, allowed, &uc_err); uspoof_setRestrictionLevel (spc_sgl, USPOOF_MODERATELY_RESTRICTIVE); #endif }