diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-19 17:24:18 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-19 17:24:18 +0100 |
commit | 3a3b6cef3e361f3e39bd78e3701a51d426ba8c12 (patch) | |
tree | 2f2ca4f755b89912c79e88f582191070abf67b5e /lualib | |
parent | b78a75ca179f30eca99b51ef88e927c85e59694b (diff) | |
download | rspamd-3a3b6cef3e361f3e39bd78e3701a51d426ba8c12.tar.gz rspamd-3a3b6cef3e361f3e39bd78e3701a51d426ba8c12.zip |
[Minor] Use rspamd_url flags to avoid sync issues
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_selectors/extractors.lua | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua index f8d8baf03..705cb5031 100644 --- a/lualib/lua_selectors/extractors.lua +++ b/lualib/lua_selectors/extractors.lua @@ -17,35 +17,12 @@ limitations under the License. local fun = require 'fun' local meta_functions = require "lua_meta" local lua_util = require "lua_util" +local rspamd_url = require "rspamd_url" local common = require "lua_selectors/common" local ts = require("tableshape").types local E = {} -local url_flags_ts = ts.array_of(ts.one_of{ - 'content', - 'has_port', - 'has_user', - 'host_encoded', - 'html_displayed', - 'idn', - 'image', - 'missing_slahes', -- sic - 'no_tld', - 'numeric', - 'obscured', - 'path_encoded', - 'phished', - 'query', - 'query_encoded', - 'redirected', - 'schema_encoded', - 'schemaless', - 'subject', - 'text', - 'unnormalised', - 'url_displayed', - 'zw_spaces', - }):is_optional() +local url_flags_ts = ts.array_of(ts.one_of(lua_util.keys(rspamd_url.flags))):is_optional() local function gen_exclude_flags_filter(exclude_flags) return function(u) |