mamalianggf opened a new issue #4922: URL: https://github.com/apache/apisix/issues/4922
### Issue description firstly,I put a plugin_meta like this: `curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/authz-casbin -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -i -X PUT -d ' { "model": "[request_definition] r = sub, obj [policy_definition] p = sub, obj [role_definition] g = _, _ [policy_effect] e = some(where (p.eft == allow)) [matchers] m = (g(r.sub, p.sub) || keyMatch(r.sub, p.sub)) && keyMatch(r.obj, p.obj)", "policy": "p, admin, /api/v1/dms/sys/version g, gaofeng, admin" }'` secondly,I reload plugin like this: `curl http://127.0.0.1:9080/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT ` thirdly,I put a route like this ` curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d ' { "name": "route-gw-cloud-dms-version", "uri": "/api/v1/dms/sys/version", "plugins": { "authz-casbin": { "username": "user" }, "proxy-rewrite": { "uri": "/sys/version" } }, "upstream": { "type": "roundrobin", "nodes": { "127.0.0.1:60200": 1 } } }'` so,when I execute the following command,I expect the response to remind me that I forgotten the header parameter,but it not `curl http://127.0.0.1:9080/api/v1/dms/sys/version` ` <!DOCTYPE html> <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="utf-8" http-equiv="encoding"> <title>500 Internal Server Error</title> <style> body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>An error occurred.</h1> <p>You can report issue to <a href="https://github.com/apache/apisix/issues">APISIX</a></p> <p><em>Faithfully yours, <a href="https://apisix.apache.org/">APISIX</a>.</em></p> </body> </html> ` The following information is displayed in the log `2021/08/29 14:21:41 [error] 41#41: *68240 lua entry thread aborted: runtime error: ...cal/apisix//deps/share/lua/5.1/src/main/CoreEnforcer.lua:403: invalid request size stack traceback: coroutine 0: [C]: in function 'error' ...cal/apisix//deps/share/lua/5.1/src/main/CoreEnforcer.lua:403: in function 'enforceEx' ...cal/apisix//deps/share/lua/5.1/src/main/CoreEnforcer.lua:526: in function 'enforce' /usr/local/apisix/apisix/plugins/authz-casbin.lua:127: in function 'phase_func' /usr/local/apisix/apisix/plugin.lua:660: in function 'run_plugin' /usr/local/apisix/apisix/init.lua:440: in function 'http_access_phase' access_by_lua(nginx.conf:261):2: in main chunk, client: 127.0.0.1, server: _, request: "GET /api/v1/dms/sys/version HTTP/1.1", host: "127.0.0.1:9080` ### Environment - apisix version (cmd: `apisix version`):2.9(Clone the Master branch of Apisix and then generate the image locally through the guidance of the Apisix-Docker project) - OS (cmd: `uname -a`):Linux tool 4.15.0-154-generic #ubuntu1804 - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):nginx version: openresty/1.19.3.1 - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):3.4.0 - luarocks version, if the issue is about installation (cmd: `luarocks --version`):/usr/local/openresty/luajit/bin/luarocks 3.7.0 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
