From: Mikhail Galanin Date: Thu, 23 Aug 2018 16:50:17 +0000 (+0100) Subject: [Minor] Parameters check: either config or task should be set X-Git-Tag: 1.8.0~210^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2439%2Fhead;p=thirdparty%2Frspamd.git [Minor] Parameters check: either config or task should be set --- diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 3b00305064..0c94969fa4 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -815,6 +815,9 @@ lua_http_request (lua_State *L) return 1; } + if (task == NULL && cfg == NULL) { + return luaL_error (L, "Bad params to rspamd_http:request(): either task or config should be set"); + } cbd = g_malloc0 (sizeof (*cbd)); cbd->cbref = cbref;