From: Vsevolod Stakhov Date: Thu, 30 Apr 2020 14:25:29 +0000 (+0100) Subject: [Minor] Fix flags and protocols checks X-Git-Tag: 2.6~468 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf45101d02820f8eec4afe99305ca81e59dfdb78;p=rspamd.git [Minor] Fix flags and protocols checks --- 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);