diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-12-12 17:54:01 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-12 17:54:01 +0600 |
commit | 1e63b18528f33f89757709e1851fa3499e512e96 (patch) | |
tree | e45d5b884ed23f7fb303743171edc8ef99ca41ff /src/lua/lua_util.c | |
parent | 7e6bec3c411cf368f37c1701141a5f65895b741a (diff) | |
parent | 3197ce7e6ad44cd4afc0f0013dfc03f8a4deeec8 (diff) | |
download | rspamd-1e63b18528f33f89757709e1851fa3499e512e96.tar.gz rspamd-1e63b18528f33f89757709e1851fa3499e512e96.zip |
Merge pull request #5254 from rspamd/vstakhov-phishing-fixes
Fix phishing symbol for the same domains
Diffstat (limited to 'src/lua/lua_util.c')
-rw-r--r-- | src/lua/lua_util.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c index 14994751c..ce4d9f67c 100644 --- a/src/lua/lua_util.c +++ b/src/lua/lua_util.c @@ -2152,6 +2152,17 @@ lua_util_is_utf_spoofed(lua_State *L) return 1; } + + /* Disable single script confusables, as it is not what we want to check */ + uspoof_setChecks(spc, + USPOOF_CONFUSABLE & ~USPOOF_SINGLE_SCRIPT_CONFUSABLE, + &uc_err); + if (uc_err != U_ZERO_ERROR) { + msg_err("Cannot set proper checks for uspoof: %s", u_errorName(uc_err)); + lua_pushboolean(L, false); + uspoof_close(spc); + return 1; + } } ret = uspoof_areConfusableUTF8(spc, s1, l1, s2, l2, &uc_err); @@ -2174,7 +2185,7 @@ lua_util_is_utf_spoofed(lua_State *L) if (uc_err != U_ZERO_ERROR) { msg_err("Cannot set proper checks for uspoof: %s", u_errorName(uc_err)); lua_pushboolean(L, false); - uspoof_close(spc); + uspoof_close(spc_sgl); return 1; } } |