aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_url.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-30 15:25:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-30 15:25:29 +0100
commitcf45101d02820f8eec4afe99305ca81e59dfdb78 (patch)
tree4370faed9ea7019dd647f6cb6a4b81a14c3ac6a2 /src/lua/lua_url.c
parent1616d15b5565b7cc61bb541823684f93fe2a19c5 (diff)
downloadrspamd-cf45101d02820f8eec4afe99305ca81e59dfdb78.tar.gz
rspamd-cf45101d02820f8eec4afe99305ca81e59dfdb78.zip
[Minor] Fix flags and protocols checks
Diffstat (limited to 'src/lua/lua_url.c')
-rw-r--r--src/lua/lua_url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_url.c b/src/lua/lua_url.c
index 6652fdaac..f07f94bbd 100644
--- a/src/lua/lua_url.c
+++ b/src/lua/lua_url.c
@@ -933,8 +933,8 @@ lua_tree_url_callback (gpointer key, gpointer value, gpointer ud)
struct rspamd_url *url = (struct rspamd_url *)value;
struct lua_tree_cb_data *cb = ud;
- if ((url->protocol & cb->protocols_mask) && (url->flags == 0 ||
- (url->flags & cb->flags_mask))) {
+ if ((url->protocol & cb->protocols_mask) == url->protocol &&
+ (url->flags == (url->flags & cb->flags_mask))) {
if (cb->skip_prob > 0) {
gdouble coin = rspamd_random_double_fast_seed (cb->xoroshiro_state);