aboutsummaryrefslogtreecommitdiff
path: root/src/lib-lua
AgeCommit message (Collapse)AuthorLines
4 daysRelease tarball dovecot-2.3.21.1.tar.gz (dist-generated files / local ↵HEADlocal/dovecotmasterbeatrice-0/+971
differences from tag)
2022-12-19lib-lua: http - Use correct dns-client pathAki Tuomi-2/+5
The current code tries to look it up from user homedir sometimes. Broken in 5b56debd31800ec45fc0c6529b138d1ce943b0aa
2022-04-26lib-lua: dlua-dovecot-http - Support more settings with HTTP clientAki Tuomi-21/+61
2022-03-16lib-lua: Add a minimal interface to lib-httpSiavash Tavakoli-0/+489
Adds the ability to - Creating http clients - Creating http requests - Adding arbitrary headers and payload to the http request - Submitting the request to remote server and getting the response
2021-09-17lib-lua: Add function for restricting global variable definitionSiavash Tavakoli-0/+47
Add "dovecot.restrict_global_variables()" with a boolean argument to mitigate unintended variable assignments and to prevent unnecessarily populating global namespace. If enabled, variables can only be defined local to the script but global functions are still allowed.
2021-09-17lib-lua: Use rawget to check presence of functions in scriptsSiavash Tavakoli-2/+4
With the restricted global variables in next commit, checking for undeclared functions results in error. Use rawget to avoid metamethods.
2021-09-17lib-lua: Build test-dict-lua only with Lua 5.3+Timo Sirainen-2/+3
Fixes building with Lua 5.1
2021-09-16lib-lua: Add test-dict-luaTimo Sirainen-1/+105
2021-08-18lib-lua: Don't include lua_resume_compat() for 5.1Siavash Tavakoli-2/+2
lua_resume() is not supported in 5.1, so don't try to add a compatibility function that fails compilation.
2021-08-17global: Use consistent lua function namesSiavash Tavakoli-10/+10
Change lua-style function names to be consistent with dovecot's style.
2021-08-17lib-lua: test-lua: Fix the test for lua versions later than 5.3Siavash Tavakoli-1/+1
2021-08-17lib-lua: Add lua_resume_compat() and use it in lua versions prior to 5.4Siavash Tavakoli-3/+23
Starting lua 5.4 "lua_resume()" expects an extra "nresults" argument. Add a compatibility function to handle this argument in earlier versions.
2021-07-12lib-lua: Fix LIBDICT_LUA variable usageAki Tuomi-1/+1
It needs to be appended to, not set again. Broken by 3d0b7e9bb59e3dc41fd5a4d09832eedea7a92933.
2021-07-08lib-lua: Only link libdict_lua if it's availableAki Tuomi-2/+8
2021-06-01lib-lua: Delay running Lua script until dlua_script_init()Timo Sirainen-13/+17
This allows the caller to register globals before running the script.
2021-06-01lib-lua: Move finalizing event and setting linked list to dlua_create_script()Timo Sirainen-3/+2
There's no need to delay them until dlua_script_create_finish().
2021-06-01lib-lua: Update dlua_script_create_*() commentTimo Sirainen-2/+1
Reusing existing scripts wasn't actually implemented.
2021-06-01lib-lua: dlua_script_init() - Always return -1 if script_init() failsTimo Sirainen-1/+3
The previous behavior was to forward the script_init() return value to the caller. This was somewhat unexpected behavior.
2021-05-12lib-lua: dlua-compat - Undefine lua_isintegerAki Tuomi-0/+1
It's being defined in compat to return boolean, so undefine it here to make sure it compiles. Broken in b59e89ebd97fa52de25b8e976a7dfe61f0d8a639
2021-05-12lib-lua: dlua-dovecot - Ref event on pushAki Tuomi-0/+2
Matches with unref on __gc.
2021-05-12lib-lua: test-lua - Use bool for expected_isnum in check_tointegerx_compatAki Tuomi-28/+28
2021-05-12lib-lua: Define lua_isinteger as boolean functionAki Tuomi-7/+8
2021-05-12lib-lua: Fix error reporting for script loadingAki Tuomi-46/+8
2021-05-12lib-lua: Use dluaL_error for luaL_errorAki Tuomi-0/+1
2021-05-12lib-lua: Fix luaL_error usageAki Tuomi-3/+3
2021-05-12lib-lua: Add dluaL_errorAki Tuomi-0/+17
2021-05-12lib-lua: dlua-script - Add dlua_pushfstringAki Tuomi-0/+31
Uses full sprintf
2021-05-12lib-lua: dlua-wrapper - Constify extra functionsAki Tuomi-1/+1
2021-05-06lib-lua: Remove obsolete threading checkJosef 'Jeff' Sipek-9/+0
We support multiple lua thread as long as they are created using the dlua_script_new_thread() helper.
2021-04-14lib-lua: Fix compiler warning with dlua_pcall_yieldable()Timo Sirainen-1/+1
2021-03-30lib-lua: Document the DLUA_WRAP_C_DATA macroJosef 'Jeff' Sipek-0/+75
2021-03-22lib-lua: dlua-threads - pop thread table after manipulationAki Tuomi-0/+6
Forgot on a84bfdaf6df8fd6a4cbbf0845c18b09e6ceada36
2021-03-22lib-lua: Fix script loadingAki Tuomi-14/+34
Handle error cases correctly.
2021-03-22lib-lua: Use dlua_pcallAki Tuomi-46/+29
2021-03-22lib-lua: Add dlua_pcallAki Tuomi-0/+88
2021-03-22lib-lua: dlua-dovecot - Ensure script is not NULLAki Tuomi-0/+4
2021-03-22lib-lua: Define LUA_OK if missingAki Tuomi-0/+4
It's defined since lua 5.2, and we support lua 5.1.
2021-03-22lib-lua: Reformat macros in dlua-script-private.hAki Tuomi-9/+15
2021-03-22lib-lua: Add callback typecheck for dlua_pcall_yieldableAki Tuomi-2/+6
2021-03-19lib-dict: Expose dict and dict transactions to lua scriptsJosef 'Jeff' Sipek-2/+7
2021-03-19lib-lua: Implement lua_seti() fallback for pre-5.3 supportJosef 'Jeff' Sipek-0/+21
2021-03-19lib-lua: Add DLUA_WRAP_C_DATA macro to more easily expose C structures to luaJosef 'Jeff' Sipek-1/+113
2021-03-19lib-lua: Add dlua_pcall_yieldableJosef 'Jeff' Sipek-0/+247
2021-03-19lib-lua: Add thread local storage APIJosef 'Jeff' Sipek-10/+216
2021-03-19lib-lua: Add new thread/close thread dlua wrappersAki Tuomi-2/+145
Code rewritten to use lua registry, warn about unclosed threads, and moved to a separate file by Josef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
2021-03-15lib-lua: Error out the build if using Lua 5.2Josef 'Jeff' Sipek-0/+4
2021-03-15Global: Remove support for Lua 5.2Josef 'Jeff' Sipek-45/+0
It took far too much effort to keep compatible with it. Since every distro out there provides either Lua 5.1 or 5.3, it makes sense to give up on 5.2.
2021-03-10lib-lua: Add table get helpersJosef 'Jeff' Sipek-20/+664
2021-03-10lib-lua: Check for function presence instead of Lua version in compat codeJosef 'Jeff' Sipek-1/+9
2021-03-10lib-lua: Reorder compat luaL_{setfuncs,setmetatable}Josef 'Jeff' Sipek-9/+11
Switch their order to keep them alphabetical. This will make the header changes in the next commit a little more consistent. Additionally, fix up the coding style.