p0pr0ck5 / lua-resty-waf

High-performance WAF built on the OpenResty stack
GNU General Public License v3.0
1.28k stars 305 forks source link

runtime error attempt to index local 'self' (a nil value) #328

Open hammedsadeghi opened 5 years ago

hammedsadeghi commented 5 years ago

hi i got this error in openresty 2019/10/06 05:38:42 [error] 27103#0: *2 lua entry thread aborted: runtime error: /usr/local/openresty/site/lualib/resty/waf.lua:430: attempt to index local 'self' (a nil value) stack traceback: coroutine 0: /usr/local/openresty/site/lualib/resty/waf.lua: in function 'exec' access_by_lua(sabahost.org.conf:109):8: in main chunk, client: 5.201.182.158, server: sabahost.org, request: "GET /?test=alert(1) HTTP/1.1", host: "sabahost.org" can you help me?

GumpSun commented 5 years ago

attempt to index local 'self' (a nil value) , Lua variable nil error.You did't use lua_resty_waf:new()?

GumpSun commented 5 years ago

https://github.com/p0pr0ck5/lua-resty-waf/issues/319#issuecomment-541293290