diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-23 20:09:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 20:09:39 +0100 |
commit | 813ad73ebd55307c1280ec968c6b5fb8f464ac2b (patch) | |
tree | 329df48b86c07a8d78726693803ec75bf78b4a09 | |
parent | 3944ae59e74c31103d3bd10fe4dd025b05d74679 (diff) | |
parent | 3ed33acaf554ca467d75c62d461c91152edf07ec (diff) | |
download | rspamd-813ad73ebd55307c1280ec968c6b5fb8f464ac2b.tar.gz rspamd-813ad73ebd55307c1280ec968c6b5fb8f464ac2b.zip |
Merge pull request #2439 from negram/parameters-check
[Minor] Parameters check: either config or task should be set
-rw-r--r-- | src/lua/lua_http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 3b0030506..0c94969fa 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; |