You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/08/11 07:55:53 UTC

[GitHub] [apisix] nic-chen opened a new issue #2045: bug: config of plugin `key-auth` shouldn't be empty

nic-chen opened a new issue #2045:
URL: https://github.com/apache/apisix/issues/2045


   ### Issue description
   config item `key` of plugin `key-auth` shouldn't be empty
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.5
   * OS: centos 7
   
   ### Minimal test code / Steps to reproduce the issue
   1. 
   curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "plugins":{
           "key-auth":{
           }
       },
       "username":"test"
   }'
   2.
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/*",
       "plugins":{
           "key-auth":{
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:80": 1
           }
       }
   }'
   
   3.
   curl http://127.0.0.1:9080/test -H 'apikey: 267c6cf0' -d '{"token":"3c3d3af8642e4d4d9439f9f1d317de92"}' -v
   
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   occur 500
   
   error log:
   `2020/08/11 07:29:13 [error] 24#24: *15975 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/key-auth.lua:49: table index is nil`
   
   ### What's the expected result?
   normal respond
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis closed issue #2045: bug: config of plugin `key-auth` for consumer shouldn't be empty

Posted by GitBox <gi...@apache.org>.
membphis closed issue #2045:
URL: https://github.com/apache/apisix/issues/2045


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis removed a comment on issue #2045: bug: config of plugin `key-auth` for consumer shouldn't be empty

Posted by GitBox <gi...@apache.org>.
membphis removed a comment on issue #2045:
URL: https://github.com/apache/apisix/issues/2045#issuecomment-672982410


   you should use `markdown` way. take a look at this issue: https://github.com/apache/apisix/issues/2050#issue-677813921
   
   ![image](https://user-images.githubusercontent.com/6814606/90041937-92252a80-dcfc-11ea-9540-ca8d69c39cf4.png)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2045: bug: config of plugin `key-auth` for consumer shouldn't be empty

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2045:
URL: https://github.com/apache/apisix/issues/2045#issuecomment-672982410


   you should use `markdown` way. take a look at this issue: https://github.com/apache/apisix/issues/2050#issue-677813921
   
   ![image](https://user-images.githubusercontent.com/6814606/90041937-92252a80-dcfc-11ea-9540-ca8d69c39cf4.png)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org