From 3ed33acaf554ca467d75c62d461c91152edf07ec Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Thu, 23 Aug 2018 17:50:17 +0100 Subject: [PATCH] [Minor] Parameters check: either config or task should be set --- src/lua/lua_http.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.3