diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-09 17:31:04 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-09 17:32:36 +0100 |
commit | d8e47a12ae221b2e79dbd786ccfa0402cff0c49b (patch) | |
tree | 727b034d73dee66be3ea760e27493f0d28293f96 /src/plugins | |
parent | 1f9ec9e844bfd53974870734fa237cc059808c28 (diff) | |
download | rspamd-d8e47a12ae221b2e79dbd786ccfa0402cff0c49b.tar.gz rspamd-d8e47a12ae221b2e79dbd786ccfa0402cff0c49b.zip |
[Fix] Fix `url:set_redirected` method
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/url_redirector.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/url_redirector.lua b/src/plugins/lua/url_redirector.lua index 19189a5ee..092fb7def 100644 --- a/src/plugins/lua/url_redirector.lua +++ b/src/plugins/lua/url_redirector.lua @@ -59,12 +59,13 @@ local settings = { } local function adjust_url(task, orig_url, redir_url) + local mempool = task:get_mempool() if type(redir_url) == 'string' then - redir_url = rspamd_url.create(task:get_mempool(), redir_url, { 'redirect_target' }) + redir_url = rspamd_url.create(mempool, redir_url, { 'redirect_target' }) end if redir_url then - orig_url:set_redirected(redir_url) + orig_url:set_redirected(redir_url, mempool) task:inject_url(redir_url) if settings.redirector_symbol then task:insert_result(settings.redirector_symbol, 1.0, |