Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postmatch开启后无法正常上传 #56

Closed
yan1zhao opened this issue Jul 20, 2015 · 6 comments
Closed

postmatch开启后无法正常上传 #56

yan1zhao opened this issue Jul 20, 2015 · 6 comments

Comments

@yan1zhao
Copy link

首先感谢您开发的ngx_lua_waf插件。
我下载了最新的代码包,并按照流程装好了这个插件,能正常启动和拦截,我主要应用在discuz x2程序上。
但发现一个问题(可能是因为我不懂配置您这个插件),我只要将config.lua中的postmatch设为on,会员就无法上传论坛附件(登陆访问我们的网站均正常),即使我把wafconf/post文件内容清空也是一样。目前只能将此项设为off,但这样防护效果肯定就打折扣了。
由于我不懂lua语法,因此想请问您是什么原因,感谢!

@loveshell
Copy link
Owner

hack.log里的拦截匹配规则你看看是哪个匹配的,删掉即可。

@yan1zhao
Copy link
Author

有劳!
如果开启postmatch,上传附件失败时,则在nginx错误日志里可以看到(waf的日志对此无提示):
lua entry thread aborted: runtime error: /usr/local/openresty/nginx/waf/waf.lua:47: attempt to index local 'm' (a number value)

stack traceback:
coroutine 0:
/usr/local/openresty/nginx/waf/waf.lua: in function </usr/local/openresty/nginx/waf/waf.lua:1>, client: 223.151.252.169, server: , request: "POST /misc.php?mod=swfupload&operation=upload&simple=1 HTTP/1.1", host: "", referrer: "/forum.php?mod=post&action=newthread&fid=3336&referer=http%3A//forum-3336-1.html"

请指教对此应如何修改配置,感谢!同时祝您一切顺利!

@loveshell
Copy link
Owner

看起来是你提交的数据,被提取到的和预期不对应,麻烦微博私信我联系方式,远程协助看看

@yan1zhao
Copy link
Author

请问您的微博是多少,方便的话直接加我的QQ434981576即可,有劳!

@yan1zhao
Copy link
Author

请问您加我了吗,因为每天都有人加我,不知道哪位是您。麻烦您在QQ上联系我说明一下,感谢。

@yan1zhao
Copy link
Author

您好,我已找到您的微博,并给您发了私信,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants