diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2025-03-24 07:29:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2025-03-24 07:29:06 +0000 |
commit | 96baa400f87bd9b8fa367c3777e27d61699e80eb (patch) | |
tree | d0dc98e8198a3441ad0478c9d1067634a002f059 /src/lua/lua_map.c | |
parent | 9dea0472b17ac77ebbbaf38f91eb2b2505c9868f (diff) | |
download | rspamd-96baa400f87bd9b8fa367c3777e27d61699e80eb.tar.gz rspamd-96baa400f87bd9b8fa367c3777e27d61699e80eb.zip |
[Fix] Fix static maps description passing
Diffstat (limited to 'src/lua/lua_map.c')
-rw-r--r-- | src/lua/lua_map.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c index 062613bd7..5f55ece06 100644 --- a/src/lua/lua_map.c +++ b/src/lua/lua_map.c @@ -1,5 +1,5 @@ /* - * Copyright 2024 Vsevolod Stakhov + * Copyright 2025 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -319,6 +319,11 @@ int lua_config_radix_from_ucl(lua_State *L) ucl_object_insert_key(fake_obj, ucl_object_fromstring("static"), "url", 0, false); + if (lua_type(L, 3) == LUA_TSTRING) { + ucl_object_insert_key(fake_obj, ucl_object_fromstring(lua_tostring(L, 3)), + "description", 0, false); + } + if ((m = rspamd_map_add_from_ucl(cfg, fake_obj, "static radix map", rspamd_radix_read, rspamd_radix_fin, |