]> source.dussan.org Git - rspamd.git/commitdiff
Remove forgotten variables in lua stack.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Feb 2015 11:52:02 +0000 (11:52 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 25 Feb 2015 12:36:42 +0000 (14:36 +0200)
Conflicts:
src/lua/lua_common.c

src/lua/lua_common.c

index 1c8e97afb02d6507e0bae53431a2ff99223dd92a..62fbc1ec53057adade76760dc5b5b4e5298fa0ef 100644 (file)
@@ -292,6 +292,12 @@ rspamd_lua_set_path (lua_State *L, struct rspamd_config *cfg)
        lua_getfield (L, -1, "path");
        old_path = luaL_checkstring (L, -1);
 
+       if (strstr (old_path, RSPAMD_PLUGINSDIR) != NULL) {
+               /* Path has been already set, do not touch it */
+               lua_pop (L, 2);
+               return;
+       }
+
        opts = ucl_object_find_key (cfg->rcl_obj, "options");
        if (opts != NULL) {
                opts = ucl_object_find_key (opts, "lua_path");