]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix captures checking in lua_regexp
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 14 May 2020 12:15:52 +0000 (13:15 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 14 May 2020 12:15:52 +0000 (13:15 +0100)
src/lua/lua_regexp.c

index b782ef7f107fd09629eb465d937990801d88c496..bd3706d16d775c52499e4ac5837387f27d1f56c0 100644 (file)
@@ -513,7 +513,7 @@ lua_regexp_search (lua_State *L)
                }
 
                if (data && len > 0) {
-                       if (lua_gettop (L) >= 4) {
+                       if (lua_gettop (L) >= 4 && lua_toboolean (L, 4)) {
                                capture = TRUE;
                                captures = g_array_new (FALSE, TRUE,
                                                sizeof (struct rspamd_re_capture));