]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Lua_util: Fix single character obfuscation checks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 Jan 2019 13:21:48 +0000 (13:21 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 Jan 2019 13:21:48 +0000 (13:21 +0000)
src/lua/lua_util.c

index 94f3bb783408e721029a525bd1a729fdea24e60f..7db5cc047af0330a8f6ab3fd28b74865905ce0e7 100644 (file)
@@ -2427,13 +2427,6 @@ lua_util_is_utf_spoofed (lua_State *L)
        else if (s1) {
                /* We have just s1, not s2 */
                if (spc_sgl == NULL) {
-                       USet *allowed = uset_openEmpty ();
-
-#if U_ICU_VERSION_MAJOR_NUM >= 51
-                       uset_addAll (allowed, uspoof_getRecommendedSet (&uc_err));
-                       uset_addAll (allowed, uspoof_getInclusionSet (&uc_err));
-#endif
-
                        spc_sgl = uspoof_open (&uc_err);
 
                        if (uc_err != U_ZERO_ERROR) {
@@ -2442,14 +2435,6 @@ lua_util_is_utf_spoofed (lua_State *L)
 
                                return 1;
                        }
-
-                       uspoof_setChecks (spc_sgl,
-                                       USPOOF_ALL_CHECKS & ~USPOOF_WHOLE_SCRIPT_CONFUSABLE,
-                                       &uc_err);
-#if U_ICU_VERSION_MAJOR_NUM >= 51
-                       uspoof_setAllowedChars (spc_sgl, allowed, &uc_err);
-                       uspoof_setRestrictionLevel (spc_sgl, USPOOF_MODERATELY_RESTRICTIVE);
-#endif
                }
 
                ret = uspoof_checkUTF8 (spc_sgl, s1, l1, NULL, &uc_err);