diff options
author | Josh Soref <2119212+jsoref@users.noreply.github.com> | 2022-02-22 17:01:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 22:01:28 +0000 |
commit | 2b8e6958f40ef36c1508118ac36a43694283a83c (patch) | |
tree | fa9a9b6843546bdb297b00bc78b83ab4c318f724 /lualib | |
parent | 85faeb34719e2b0898d319b02416f669d70f4562 (diff) | |
download | rspamd-2b8e6958f40ef36c1508118ac36a43694283a83c.tar.gz rspamd-2b8e6958f40ef36c1508118ac36a43694283a83c.zip |
Spelling (#4086)
[Rework] Massive spelling fix from @jsoref
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_cfg_transform.lua | 2 | ||||
-rw-r--r-- | lualib/lua_content/pdf.lua | 16 | ||||
-rw-r--r-- | lualib/lua_fuzzy.lua | 2 | ||||
-rw-r--r-- | lualib/lua_meta.lua | 4 | ||||
-rw-r--r-- | lualib/lua_redis.lua | 4 | ||||
-rw-r--r-- | lualib/lua_scanners/common.lua | 2 | ||||
-rw-r--r-- | lualib/lua_scanners/fprot.lua | 2 | ||||
-rw-r--r-- | lualib/lua_scanners/sophos.lua | 2 | ||||
-rw-r--r-- | lualib/lua_scanners/virustotal.lua | 2 | ||||
-rw-r--r-- | lualib/lua_selectors/init.lua | 2 | ||||
-rw-r--r-- | lualib/lua_stat.lua | 2 | ||||
-rw-r--r-- | lualib/lua_util.lua | 8 | ||||
-rw-r--r-- | lualib/lua_verdict.lua | 2 | ||||
-rw-r--r-- | lualib/plugins/dmarc.lua | 6 | ||||
-rw-r--r-- | lualib/plugins/neural.lua | 6 | ||||
-rw-r--r-- | lualib/rspamadm/clickhouse.lua | 2 | ||||
-rw-r--r-- | lualib/rspamadm/configgraph.lua | 10 | ||||
-rw-r--r-- | lualib/rspamadm/configwizard.lua | 2 | ||||
-rw-r--r-- | lualib/rspamadm/mime.lua | 16 |
19 files changed, 46 insertions, 46 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index 050686df2..295c952db 100644 --- a/lualib/lua_cfg_transform.lua +++ b/lualib/lua_cfg_transform.lua @@ -396,7 +396,7 @@ return function(cfg) local actions_set = lua_util.list_to_hash(actions_defs) - -- Now check actions section for garbadge + -- Now check actions section for garbage actions_set['unknown_weight'] = true actions_set['grow_factor'] = true actions_set['subject'] = true diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua index 45c11d3b4..d73c7b1ae 100644 --- a/lualib/lua_content/pdf.lua +++ b/lualib/lua_content/pdf.lua @@ -558,7 +558,7 @@ local function process_action(task, pdf, obj) local extracted_js = maybe_extract_object_stream(js, pdf, task) if not extracted_js then - lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s', + lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s', obj.major, obj.minor, js) else js = extracted_js @@ -571,7 +571,7 @@ local function process_action(task, pdf, obj) lua_util.debugm(N, task, 'extracted javascript from %s:%s: %s', obj.major, obj.minor, obj.js.data) else - lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s', + lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s', obj.major, obj.minor, js) end elseif obj.dict.F then @@ -654,7 +654,7 @@ process_dict = function(task, pdf, obj, dict) if obj.dict.S and obj.dict.JS then obj.type = 'Javascript' - lua_util.debugm(N, task, 'implicit type for Javascript object %s:%s', + lua_util.debugm(N, task, 'implicit type for JavaScript object %s:%s', obj.major, obj.minor) else lua_util.debugm(N, task, 'no type for %s:%s', @@ -757,7 +757,7 @@ process_dict = function(task, pdf, obj, dict) local extracted_js = maybe_extract_object_stream(js, pdf, task) if not extracted_js then - lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s', + lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s', obj.major, obj.minor, js) else js = extracted_js @@ -770,7 +770,7 @@ process_dict = function(task, pdf, obj, dict) lua_util.debugm(N, task, 'extracted javascript from %s:%s: %s', obj.major, obj.minor, obj.js.data) else - lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s', + lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s', obj.major, obj.minor, js) end end @@ -1248,7 +1248,7 @@ local function process_pdf(input, mpart, task) pdf_object.openaction.object.major, pdf_object.openaction.object.minor) table.insert(pdf_output.fuzzy_hashes, pdf_object.openaction.bin_hash) else - lua_util.debugm(N, task, "pdf: skip fuzzy hash from Javascript: %s, too short: %s", + lua_util.debugm(N, task, "pdf: skip fuzzy hash from JavaScript: %s, too short: %s", pdf_object.openaction.hash, #pdf_object.openaction.data) end end @@ -1256,13 +1256,13 @@ local function process_pdf(input, mpart, task) -- All hashes for h,sc in pairs(pdf_object.scripts) do if config.min_js_fuzzy and #sc.data >= config.min_js_fuzzy then - lua_util.debugm(N, task, "pdf: add fuzzy hash from Javascript: %s; size = %s; object: %s:%s", + lua_util.debugm(N, task, "pdf: add fuzzy hash from JavaScript: %s; size = %s; object: %s:%s", sc.hash, #sc.data, sc.object.major, sc.object.minor) table.insert(pdf_output.fuzzy_hashes, h) else - lua_util.debugm(N, task, "pdf: skip fuzzy hash from Javascript: %s, too short: %s", + lua_util.debugm(N, task, "pdf: skip fuzzy hash from JavaScript: %s, too short: %s", sc.hash, #sc.data) end end diff --git a/lualib/lua_fuzzy.lua b/lualib/lua_fuzzy.lua index 45227330f..eaeea7158 100644 --- a/lualib/lua_fuzzy.lua +++ b/lualib/lua_fuzzy.lua @@ -246,7 +246,7 @@ local function mime_types_check(task, part, rule) local id = part:get_id() lua_util.debugm(N, task, 'check binary part %s: %s', id, ct) - -- For bad mime mime parts we implicitly enable fuzzy check + -- For bad mime parts we implicitly enable fuzzy check local mime_trace = (task:get_symbol('MIME_TRACE') or {})[1] local opts = {} diff --git a/lualib/lua_meta.lua b/lualib/lua_meta.lua index 4f4a6e3ac..94ce73053 100644 --- a/lualib/lua_meta.lua +++ b/lualib/lua_meta.lua @@ -239,7 +239,7 @@ local function meta_words_function(task) 0, -- ascii characters rate 0, -- non-ascii characters rate 0, -- capital characters rate - 0, -- numeric cahracters + 0, -- numeric characters } for _,p in ipairs(tp) do local stats = p:get_stats() @@ -385,7 +385,7 @@ local metafunctions = { 'ascii_characters_rate', 'non_ascii_characters_rate', 'capital_characters_rate', - 'numeric_cahracters' + 'numeric_characters' }, description = [[Functions for words data matching: - average length of the words diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index 5bd6ede30..7737afa2b 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -79,7 +79,7 @@ local function redis_query_sentinel(ev_base, params, initialised) for _,m in ipairs(result) do local master = flatten_redis_table(m) - -- Wrap IPv6-adresses in brackets + -- Wrap IPv6-addresses in brackets if (master.ip:match(":")) then master.ip = "["..master.ip.."]" end @@ -110,7 +110,7 @@ local function redis_query_sentinel(ev_base, params, initialised) lutil.debugm(N, rspamd_config, 'found slave for master %s with ip %s and port %s', v.name, slave.ip, slave.port) - -- Wrap IPv6-adresses in brackets + -- Wrap IPv6-addresses in brackets if (slave.ip:match(":")) then slave.ip = "["..slave.ip.."]" end diff --git a/lualib/lua_scanners/common.lua b/lualib/lua_scanners/common.lua index d052f4552..cefec8780 100644 --- a/lualib/lua_scanners/common.lua +++ b/lualib/lua_scanners/common.lua @@ -405,7 +405,7 @@ local function check_parts_match(task, rule) lua_util.debugm(rule.name, task, '%s: extension matched: |%s|%s|', rule.log_prefix, ext, ext2) return true elseif match_filter(task, rule, fname, rule.mime_parts_filter_regex, 'regex') then - lua_util.debugm(rule.name, task, '%s: filname regex matched', rule.log_prefix) + lua_util.debugm(rule.name, task, '%s: filename regex matched', rule.log_prefix) return true end end diff --git a/lualib/lua_scanners/fprot.lua b/lualib/lua_scanners/fprot.lua index 4c416524c..0d63bf4b8 100644 --- a/lualib/lua_scanners/fprot.lua +++ b/lualib/lua_scanners/fprot.lua @@ -135,7 +135,7 @@ local function fprot_check(task, content, digest, rule, maybe_part) rule['symbol'], rule['type']) end else - -- returncodes: 1: infected, 2: suspicious, 3: both, 4-255: some error occured + -- returncodes: 1: infected, 2: suspicious, 3: both, 4-255: some error occurred -- see http://www.f-prot.com/support/helpfiles/unix/appendix_c.html for more detail local vname = string.match(data, '^[1-3] <[%w%s]-: (.-)>') if not vname then diff --git a/lualib/lua_scanners/sophos.lua b/lualib/lua_scanners/sophos.lua index 36ebe4177..cfbe93ff2 100644 --- a/lualib/lua_scanners/sophos.lua +++ b/lualib/lua_scanners/sophos.lua @@ -149,7 +149,7 @@ local function sophos_check(task, content, digest, rule, maybe_part) rspamd_logger.warnx(task, 'Message is oversized (REJ 4): %s', data) common.yield_result(task, rule, 'SAVDI: Message oversized (REJ 4)', 0.0, 'fail', maybe_part) - -- excplicitly set REJ1 message when SAVDIreports a protocol error + -- explicitly set REJ1 message when SAVDIreports a protocol error elseif string.find(data, 'REJ 1') then rspamd_logger.errx(task, 'SAVDI (Protocol error (REJ 1)): %s', data) common.yield_result(task, rule, 'SAVDI: Protocol error (REJ 1)', diff --git a/lualib/lua_scanners/virustotal.lua b/lualib/lua_scanners/virustotal.lua index 8c5d71dbb..030f053e1 100644 --- a/lualib/lua_scanners/virustotal.lua +++ b/lualib/lua_scanners/virustotal.lua @@ -16,7 +16,7 @@ limitations under the License. --[[[ -- @module virustotal --- This module contains Virustotal integaration support +-- This module contains Virustotal integration support -- https://www.virustotal.com/ --]] diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua index eabf14b27..ef9a9d7e9 100644 --- a/lualib/lua_selectors/init.lua +++ b/lualib/lua_selectors/init.lua @@ -481,7 +481,7 @@ exports.combine_selectors = function(_, selectors, delimiter) return rspamd_text.fromtable(selectors, delimiter) end else - -- We need to do a spill on each table selector and make a cortezian product + -- We need to do a spill on each table selector and make a cortesian product -- e.g. s:tbl:s -> s:telt1:s + s:telt2:s ... local tbl = {} local res = {} diff --git a/lualib/lua_stat.lua b/lualib/lua_stat.lua index 39eb21b0e..7fff6cefe 100644 --- a/lualib/lua_stat.lua +++ b/lualib/lua_stat.lua @@ -396,7 +396,7 @@ exports.convert_sqlite_to_redis = convert_sqlite_to_redis -- symbol_ham = YYY -- db_spam = XXX.sqlite -- db_ham = YYY.sqlite --- learn_cahe = ZZZ.sqlite +-- learn_cache = ZZZ.sqlite -- per_user = true/false -- label = str -- } diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index 4b0e50192..308663399 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -74,10 +74,10 @@ local function rspamd_str_split(s, sep) end --[[[ --- @function lua_util.str_split(text, deliminator) --- Splits text into a numeric table by deliminator --- @param {string} text deliminated text --- @param {string} deliminator the deliminator +-- @function lua_util.str_split(text, delimiter) +-- Splits text into a numeric table by delimiter +-- @param {string} text delimited text +-- @param {string} delimiter the delimiter -- @return {table} numeric table containing string parts --]] diff --git a/lualib/lua_verdict.lua b/lualib/lua_verdict.lua index d6a1634a7..cde33f52e 100644 --- a/lualib/lua_verdict.lua +++ b/lualib/lua_verdict.lua @@ -77,7 +77,7 @@ local default_possible_verdicts = { }, uncertain = { can_learn = false, - description = 'not certainity in verdict' + description = 'not certainty in verdict' } } diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua index c72b68824..ef108a937 100644 --- a/lualib/plugins/dmarc.lua +++ b/lualib/plugins/dmarc.lua @@ -152,7 +152,7 @@ exports.gen_munging_callback = function(munging_opts, settings) if munging_opts.munge_map_condition then local accepted,trace = munging_opts.munge_map_condition:process(task) if not accepted then - lua_util.debugm(task, 'skip munging, maps condition not satisified: (%s)', + lua_util.debugm(task, 'skip munging, maps condition not satisfied: (%s)', trace) -- Excepted return @@ -274,7 +274,7 @@ end -- Used to check dmarc record, check elements and produce dmarc policy processed -- result. -- Returns: --- false,false - record is garbadge +-- false,false - record is garbage -- false,error_message - record is invalid -- true,policy_table - record is valid and parsed ]] @@ -349,7 +349,7 @@ local function dmarc_check_record(log_obj, record, is_tld) end result.raw_elts = elts else - return false,false -- Ignore garbadge + return false,false -- Ignore garbage end return true, result diff --git a/lualib/plugins/neural.lua b/lualib/plugins/neural.lua index 3ce91b5e2..ba8550a42 100644 --- a/lualib/plugins/neural.lua +++ b/lualib/plugins/neural.lua @@ -456,7 +456,7 @@ local function can_push_train_vector(rule, task, learn_type, nspam, nham) if nspam <= train_opts.max_trains then if train_opts.spam_skip_prob then if coin <= train_opts.spam_skip_prob then - rspamd_logger.infox(task, 'skip %s sample probabilisticaly; probability %s (%s skip chance)', learn_type, + rspamd_logger.infox(task, 'skip %s sample probabilistically; probability %s (%s skip chance)', learn_type, coin, train_opts.spam_skip_prob) return false end @@ -471,7 +471,7 @@ local function can_push_train_vector(rule, task, learn_type, nspam, nham) if nham <= train_opts.max_trains then if train_opts.ham_skip_prob then if coin <= train_opts.ham_skip_prob then - rspamd_logger.infox(task, 'skip %s sample probabilisticaly; probability %s (%s skip chance)', learn_type, + rspamd_logger.infox(task, 'skip %s sample probabilistically; probability %s (%s skip chance)', learn_type, coin, train_opts.ham_skip_prob) return false end @@ -533,7 +533,7 @@ local function spawn_train(params) else local inputs, outputs = {}, {} - -- Used to show sparsed vectors in a convenient format (for debugging only) + -- Used to show parsed vectors in a convenient format (for debugging only) local function debug_vec(t) local ret = {} for i,v in ipairs(t) do diff --git a/lualib/rspamadm/clickhouse.lua b/lualib/rspamadm/clickhouse.lua index 7f215f6aa..63e025f3e 100644 --- a/lualib/rspamadm/clickhouse.lua +++ b/lualib/rspamadm/clickhouse.lua @@ -165,7 +165,7 @@ local function days_list(days) end local function get_excluded_symbols(known_symbols, correlations, seen_total) - -- Walk results once to collect all symbols & count ocurrences + -- Walk results once to collect all symbols & count occurrences local remove = {} local known_symbols_list = {} diff --git a/lualib/rspamadm/configgraph.lua b/lualib/rspamadm/configgraph.lua index 9afc76cd6..6eef1f42f 100644 --- a/lualib/rspamadm/configgraph.lua +++ b/lualib/rspamadm/configgraph.lua @@ -38,7 +38,7 @@ local function process_filename(fname) return fname end -local function output_dot(opts, nodes, adjastency) +local function output_dot(opts, nodes, adjacency) rspamd_logger.messagex("digraph rspamd {") for k,node in pairs(nodes) do local attrs = {"shape=box"} @@ -62,7 +62,7 @@ local function output_dot(opts, nodes, adjastency) table.concat(attrs, ',')) end end - for _,adj in ipairs(adjastency) do + for _,adj in ipairs(adjacency) do local attrs = {} local skip = false @@ -91,7 +91,7 @@ end local function load_config_traced(opts) local glob_traces = {} - local adjastency = {} + local adjacency = {} local nodes = {} local function maybe_match_glob(file) @@ -105,7 +105,7 @@ local function load_config_traced(opts) end local function add_dep(from, node, args) - adjastency[#adjastency + 1] = { + adjacency[#adjacency + 1] = { from = from, to = node, args = args @@ -157,7 +157,7 @@ local function load_config_traced(opts) os.exit(1) end - output_dot(opts, nodes, adjastency) + output_dot(opts, nodes, adjacency) end diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua index 7c2d67cb5..bfbabbf0f 100644 --- a/lualib/rspamadm/configwizard.lua +++ b/lualib/rspamadm/configwizard.lua @@ -445,7 +445,7 @@ local function check_redis_classifier(cls, changes) end if not symbol_spam or not symbol_ham then - printf("Calssifier has no symbols defined") + printf("Classifier has no symbols defined") return end diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua index 0864af3fb..e5a7e1c01 100644 --- a/lualib/rspamadm/mime.lua +++ b/lualib/rspamadm/mime.lua @@ -381,9 +381,9 @@ local function extract_handler(opts) end if opts.words then - local howw = opts['words_format'] or 'stem' + local how_words = opts['words_format'] or 'stem' table.insert(out_elts[fname], 'meta_words: ' .. - print_words(task:get_meta_words(howw), howw == 'full')) + print_words(task:get_meta_words(how_words), how_words == 'full')) end if opts.text or opts.html then @@ -402,9 +402,9 @@ local function extract_handler(opts) end if opts.words then - local howw = opts['words_format'] or 'stem' - table.insert(out_elts[fname], print_words(part:get_words(howw), - howw == 'full')) + local how_words = opts['words_format'] or 'stem' + table.insert(out_elts[fname], print_words(part:get_words(how_words), + how_words == 'full')) else table.insert(out_elts[fname], tostring(part:get_content(how))) end @@ -416,9 +416,9 @@ local function extract_handler(opts) end if opts.words then - local howw = opts['words_format'] or 'stem' - table.insert(out_elts[fname], print_words(part:get_words(howw), - howw == 'full')) + local how_words = opts['words_format'] or 'stem' + table.insert(out_elts[fname], print_words(part:get_words(how_words), + how_words == 'full')) else if opts.structure then local hc = part:get_html() |