diff options
author | Pragadeesh Chandiran <pchandiran@mimecast.com> | 2022-12-22 14:47:16 -0500 |
---|---|---|
committer | Pragadeesh Chandiran <pchandiran@mimecast.com> | 2022-12-22 15:00:08 -0500 |
commit | b5bed7ddf2dc46f9c990a06db88904e80b1a18fd (patch) | |
tree | 2349a833c28736e2674b8e76c02d332a057460c1 /src/lua | |
parent | 326d5b37a3ce99c256fe109c004640c18b73f50b (diff) | |
download | rspamd-b5bed7ddf2dc46f9c990a06db88904e80b1a18fd.tar.gz rspamd-b5bed7ddf2dc46f9c990a06db88904e80b1a18fd.zip |
[Fix] Return true from has_urls(true) if only emails are present
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_task.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 3288b8385..f19d424fe 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -2605,17 +2605,17 @@ lua_task_has_urls (lua_State * L) { LUA_TRACE_POINT; struct rspamd_task *task = lua_check_task (L, 1); - bool need_urls = false; + bool need_emails = false; gboolean ret = FALSE; gsize sz = 0; if (task) { if (task->message) { if (lua_gettop (L) >= 2) { - need_urls = lua_toboolean (L, 2); + need_emails = lua_toboolean (L, 2); } - if (!need_urls) { + if (need_emails) { /* Simplified check */ if (kh_size (MESSAGE_FIELD (task, urls)) > 0) { sz += kh_size (MESSAGE_FIELD (task, urls)); |