From e22719492096ed63172f8634d2984584f369360b Mon Sep 17 00:00:00 2001 From: wiaamm Date: Tue, 2 Dec 2025 10:09:11 +0200 Subject: [PATCH] fix oom --- .../kong/plugins/open-appsec-waf-kong-plugin/handler.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua b/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua index a2be343..b7504ca 100755 --- a/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua +++ b/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua @@ -77,6 +77,7 @@ function NanoHandler.access(conf) local verdict, response = nano.send_data(session_id, session_data, meta_data, req_headers, contains_body, nano.HttpChunkType.HTTP_REQUEST_FILTER) if verdict == nano.AttachmentVerdict.DROP then kong.ctx.plugin.blocked = true + kong.ctx.plugin.inspection_complete = true local result = nano.handle_custom_response(session_data, response) nano.fini_session(session_data) nano.cleanup_all() @@ -91,6 +92,7 @@ function NanoHandler.access(conf) verdict, response = nano.send_body(session_id, session_data, body, nano.HttpChunkType.HTTP_REQUEST_BODY) if verdict == nano.AttachmentVerdict.DROP then kong.ctx.plugin.blocked = true + kong.ctx.plugin.inspection_complete = true local result = nano.handle_custom_response(session_data, response) nano.fini_session(session_data) nano.cleanup_all() @@ -107,6 +109,7 @@ function NanoHandler.access(conf) verdict, response = nano.send_body(session_id, session_data, body_data, nano.HttpChunkType.HTTP_REQUEST_BODY) if verdict == nano.AttachmentVerdict.DROP then kong.ctx.plugin.blocked = true + kong.ctx.plugin.inspection_complete = true local result = nano.handle_custom_response(session_data, response) nano.fini_session(session_data) nano.cleanup_all() @@ -128,6 +131,7 @@ function NanoHandler.access(conf) verdict, response = nano.send_body(session_id, session_data, entire_body, nano.HttpChunkType.HTTP_REQUEST_BODY) if verdict == nano.AttachmentVerdict.DROP then kong.ctx.plugin.blocked = true + kong.ctx.plugin.inspection_complete = true local result = nano.handle_custom_response(session_data, response) nano.fini_session(session_data) nano.cleanup_all() @@ -159,6 +163,7 @@ function NanoHandler.access(conf) if verdict == nano.AttachmentVerdict.DROP then kong.ctx.plugin.blocked = true + kong.ctx.plugin.inspection_complete = true local result = nano.handle_custom_response(session_data, response) nano.fini_session(session_data) nano.cleanup_all() @@ -183,6 +188,7 @@ function NanoHandler.access(conf) if verdict == nano.AttachmentVerdict.DROP then kong.ctx.plugin.blocked = true + kong.ctx.plugin.inspection_complete = true local result = nano.handle_custom_response(session_data, response) nano.fini_session(session_data) nano.cleanup_all()