summaryrefslogtreecommitdiffstats
path: root/lualib/lua_util.lua
Commit message (Collapse)AuthorAgeFilesLines
* [Feature] Add rspamadm secretbox commandIvan Stakhov2024-09-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [Minor] Small fix for error messages * [Feature] Create rspamadm util to decrypt header * [Feature] Create python example to encrypt/decrypt header * [Minor] Small clean up * [Minor] Change c-rspamadm util to lua-rspamadm util * [Minor] Small clean up * [Minor] Add some debug * [Feature] Add secretbox command * [Minor] Debug * [Minor] Add additional return for encrypted string(noce + encrypted string * [Minor] Small debug * [Minor] Add a way to provide encrypted text concatenated with nonce * [Minor] Add nonce to encrypt text * [Minor] Clean up * [Minor] Clean up unused variable * [Minor] Small fix * [Minor] Fix return issue * [Minor] Add blake2b for key derivation * [Minor] Small upgrade to debug * [Minor] Small clean up * [Minor] Change return to more convenient form * [Minor] Change print to test form * [Test] Provide tests for encrypt/decrypt with rspamadm util and python script * [Minor] Change python to python3 * [Minor] Add stderr check * [Minor] Make the function return nonce+text * [Minor] Change unit tests to new return format * [Minor] Add flag to manage encodings * [Minor] Add --encoding argument to manage encodings * [Minor] Change tests for new input format * [Minor] Fix lua format * [Minor] Small fix * [Minor] Provide full support for new return format of maybe_encrypt_header * [Test] Test small fix * [Test] Small fix * [Minor] Clean up * [Minor] Small fix for name of variable * [Minor] Small clean up * [Minor] Change format of command to a mre convenient * [Minor] Change tests to be same as a format of a command * [Minor] Change description of flags * [Minor] Small fix --------- Co-authored-by: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com>
* [Feature] Add tooling to encrypt strings in LuaIvan Stakhov2024-09-051-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [Fix] Provide support for OpenSSL 3.0 * [Feature] Provide function to encode header with configured public key * [Feature] Provide function to decode header with configured public key * [Test] Add tests for maybe encode/decode header * [Minor] Fix tests for encode/decode header * [Minor] Small clean up * [Minor] Small clean up * [Minor] Small fix for OpenSSL 3.0 support * [Minor] Provide logging * [Minor] Small fix * [Fix] Fix typo error * [Fix] Another typo * [Minor] Little clean up * [Minor] Little fix * [Minor] Small fix * [Minor] Small fix * [Minor] Rewrite the arguments of secretbox:encrypt/decrypt functions to a more understandable format * [Fix] Fix problem with nonce was not provided * [Test] Add test for nonce * [Minor] Little clean up * [Minor] Little clean up * [Test] Test * [Test] Test * [Test] Test * [Minor] Little fix * [Minor] Small fix * [Minor] Small fix * [Test] Small fix * [Test] Test * [Test] Test * [Test] Test * [Test] Test * [Minor] Small fix for fips provider * [Minor] Change provider apply logic * [Test] Little fix for provider * [Minor] Provide OpenSSL <3.0 support * [Test] Possible provider fix * [Test] Possible provider fix * [Test] Little fix * [Minor] Fix provider issue * [Minor] Small clean up * [Minor] Change logging errors * Update lualib/lua_util.lua --------- Co-authored-by: Vsevolod Stakhov <vsevolod@rspamd.com>
* deduplicate url_encode_stringTarmo Oja2024-09-041-0/+3
|
* handle nilTarmo Oja2024-08-231-0/+3
|
* [PATCH] Encode constructed path to be URL safe.Tarmo Oja2024-08-221-0/+18
| | | | fix #4643
* [Minor] Add support for transparent ucl in override_defaultsVsevolod Stakhov2024-08-161-4/+24
|
* [Minor] Fix uitil.unpack functionVsevolod Stakhov2024-06-101-2/+2
|
* [Minor] Escape liquidVsevolod Stakhov2024-02-261-2/+2
|
* [Rework] Allow custom filters in `jinja_template`Vsevolod Stakhov2024-02-251-6/+44
|
* [Fix] Allow different template expansion parametersVsevolod Stakhov2024-02-211-38/+46
| | | | Probably one of the most dirty hacks I've used in the Lua code in Rspamd...
* Revert "[Fix] Fix history key, as we use `{=` and not `{{` in templates"Vsevolod Stakhov2024-02-211-2/+2
|
* [Fix] Fix history key, as we use `{=` and not `{{` in templatesVsevolod Stakhov2024-02-211-2/+2
|
* [Fix] Fix merge table utilityVsevolod Stakhov2023-08-071-2/+15
|
* [Minor] Move config stuff outVsevolod Stakhov2023-08-071-46/+4
|
* [Minor] Allow to log configuration errors from pluginsVsevolod Stakhov2023-08-071-0/+20
|
* [Minor] Distinguish failures from unknown errorsVsevolod Stakhov2023-08-071-93/+136
|
* fix: redis schema parsingSimon Hauser2023-08-041-0/+13
|
* [Minor] Load redis scripts from the prefix to simplify callsVsevolod Stakhov2023-03-251-0/+7
|
* [Minor] Add a utility to join path componentsVsevolod Stakhov2023-03-241-0/+18
|
* [Minor] Add a simple function to strip Lua commentsVsevolod Stakhov2023-03-231-0/+24
|
* [Rework] Reiterate on prioritiesVsevolod Stakhov2022-09-101-0/+8
|
* [Minor] Register some more timeoutsVsevolod Stakhov2022-09-101-0/+11
|
* [Feature] Add function to store upstreams for HTTP urlsVsevolod Stakhov2022-07-031-0/+33
|
* [Minor] Fix issues found by the new luacheck versionVsevolod Stakhov2022-04-141-1/+1
|
* [Minor] Update my email and the copyright yearVsevolod Stakhov2022-03-251-1/+1
|
* [Minor] Microoptimize lua_util.str_endswithAnton Yuzhaninov2022-02-261-1/+1
| | | | | | | | Use find to check string suffix instead of sub (which involves string interning of a returned string). Benchmarks with LuaJIT 2.1.0 shows that an option with find is significantly faster. While here added unit test for this function.
* Spelling (#4086)Josh Soref2022-02-221-4/+4
| | | [Rework] Massive spelling fix from @jsoref
* [Minor] Add unhex utilityVsevolod Stakhov2021-12-211-0/+15
|
* [Minor] Pet luacheckVsevolod Stakhov2021-08-241-2/+0
|
* [Minor] Detect logger's debug level in lua debug utilitiesVsevolod Stakhov2021-08-241-13/+12
|
* [Minor] Add lua_util.shuffleVsevolod Stakhov2021-08-061-0/+15
|
* [Minor] Allow to enable specific module debugVsevolod Stakhov2021-08-041-0/+6
|
* [Minor] Improve the default sort function in deep_sort functionVsevolod Stakhov2020-11-131-1/+9
|
* [Minor] Exclude '@' from quote characterVsevolod Stakhov2020-10-121-1/+1
|
* [Minor] Lua_util: Add maybe_smtp_quote_valueVsevolod Stakhov2020-10-121-0/+16
|
* [Minor] Lua_util: Fix round functionVsevolod Stakhov2020-10-111-2/+6
|
* [Minor] Fix cache keyAndrew Lewis2020-10-021-1/+7
|
* [Feature] RBL: support matching content/image URLs onlyAndrew Lewis2020-10-011-0/+2
|
* [Minor] Add deepsort utilityVsevolod Stakhov2020-09-141-1/+22
|
* [Minor] Add Lua functions str_startswith and str_endswithAnton Yuzhaninov2020-08-191-0/+20
|
* [Minor] Allow to get content urls in extract_specific routineVsevolod Stakhov2020-05-051-3/+30
|
* [Feature] Spf: Add external_relay optionVsevolod Stakhov2019-12-021-1/+1
|
* [Minor] Add generic methods to deal with check_local/check_authed flagsVsevolod Stakhov2019-12-021-0/+58
|
* [Minor] Add `lua_util.nkeys` utilityVsevolod Stakhov2019-11-261-0/+24
|
* [Feature] Add verdict library in luaVsevolod Stakhov2019-11-041-28/+2
|
* [Minor] Adopt lua_util.extract_specific_urlsVsevolod Stakhov2019-09-201-1/+1
|
* [Minor] Add str_trim aliasVsevolod Stakhov2019-09-091-1/+9
|
* [Minor] Lua_util: Allow to enable debug logging by a single methodVsevolod Stakhov2019-09-051-0/+8
|
* [Minor] Another fix to extract_specificVsevolod Stakhov2019-08-301-9/+1
|
* [Feature] Support images when extracting urlsVsevolod Stakhov2019-08-291-2/+15
|