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

v0.8.1 api创建 waf 的 selector 失败 #400

Open
ruicky opened this issue Dec 18, 2019 · 0 comments
Open

v0.8.1 api创建 waf 的 selector 失败 #400

ruicky opened this issue Dec 18, 2019 · 0 comments

Comments

@ruicky
Copy link

ruicky commented Dec 18, 2019

使用的Orange版本

v0.8.1

需求或场景

使用 api 添加 waf selector

使用的插件

无,涉及waf

具体的配置
curl http://localhost:7777/waf/selectors -X POST -d '
{
    "name": "waf-selectors",
    "type": 0,
    "judge": {},
    "handle": {
        "continue": true,
        "log": false
    },
    "enable": true
}' 
期望的结果

期望能够创建成功 selector

错误的结果

api_error.log 如下:

[error] 5248#5248: *4905 [lua] server.lua:76: func(): .../deps/share/lua/5.1/orange/orange/plugins/common_api.lua:513: attempt to index local 'selector' (a nil value)
stack traceback:
	/usr/local/lor/lor/lib/router/router.lua:204: in function '__newindex'
	.../deps/share/lua/5.1/orange/orange/plugins/common_api.lua:513: in function 'func'
	/usr/local/lor/lor/lib/router/router.lua:192: in function </usr/local/lor/lor/lib/router/router.lua:191>
	[C]: in function 'xpcall'
	/usr/local/lor/lor/lib/router/router.lua:191: in function 'func'
	/usr/local/lor/lor/lib/router/router.lua:192: in function </usr/local/lor/lor/lib/router/router.lua:191>
	[C]: in function 'xpcall'
	/usr/local/lor/lor/lib/router/router.lua:191: in function 'next'
	/usr/local/lor/lor/lib/router/router.lua:213: in function 'handle'
	/usr/local/lor/lor/lib/application.lua:95: in function </usr/local/lor/lor/lib/application.lua:94>
	[C]: in function 'xpcall'
	/usr/local/lor/lor/lib/application.lua:94: in function 'handle'
	/usr/local/lor/lor/lib/application.lua:54: in function 'run'
	content_by_lua(nginx.conf:154):3: in main chunk, client: 10.254.111.40, server: , request: "POST /waf/selectors HTTP/1.1", host: "127.0.0.1:7777"
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

1 participant