commit 0aca548: [Minor] Lua_util: Fix single character obfuscation checks

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jan 29 14:28:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-01-29 13:21:48 +0000
URL: https://github.com/rspamd/rspamd/commit/0aca548f5e5c9468d5af182be2ec0a6ff5bb659a

[Minor] Lua_util: Fix single character obfuscation checks

---
 src/lua/lua_util.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 94f3bb783..7db5cc047 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -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);


More information about the Commits mailing list