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/03/30 06:34:24 UTC

[GitHub] [incubator-apisix] csluoqi opened a new issue #1366: bug:

csluoqi opened a new issue #1366: bug: 
URL: https://github.com/apache/incubator-apisix/issues/1366
 
 
   ### Issue description
   basic-auth插件,如果在页面上设置password为全数字,在通过curl 和postman测试后,都会报错
   {"message":"Password is error"}。但是如果密码是英文,比如bar 那么两个测试工具的测试结果都是正确的。
   ### Environment
   
   * apisix version (cmd: `apisix version`):
   * OS:
   
   ### Minimal test code / Steps to reproduce the issue
   1.
   2.
   3.
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   basic-auth插件,如果在页面上设置password为全数字,在通过curl 和postman测试后,都会报错
   {"message":"Password is error"}。但是如果密码是英文,比如bar 那么两个测试工具的测试结果都是正确的。
   
   ### What's the expected result?
   如果密码是数字也能测试通过。

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on issue #1366: bug:

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1366: bug: 
URL: https://github.com/apache/incubator-apisix/issues/1366#issuecomment-608195925
 
 
   @csluoqi Can you provide an example of a reproduction? I tested the digital password and it didn't come up.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1366: bug:

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1366: bug: 
URL: https://github.com/apache/incubator-apisix/issues/1366#issuecomment-609028456
 
 
   I make a test right now, it works fine, please take a look at the steps.
   
   ```shell
   # set password
   $ curl -i http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "username": "foo",
       "plugins": {
           "basic-auth": {
               "username": "foo",
               "password": "bar"
           }
       }
   }'
   
   # expect: OK
   $ curl http://127.0.0.1:9080/hello -H 'Authorization: Basic Zm9vOmJhcg==' -i
   HTTP/1.1 200 OK
   
   # set new passworld
   $ curl -i http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "username": "foo",
       "plugins": {
           "basic-auth": {
               "username": "foo",
               "password": "new_password"
           }
       }
   }'
   HTTP/1.1 200 OK
   ... ...
   
   # failed to auth
   $ curl http://127.0.0.1:9080/hello -H 'Authorization: Basic Zm9vOmJhcg==' -i
   HTTP/1.1 401 Unauthorized
   ... ...
   
   # set to the old password
   $ curl -i http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "username": "foo",
       "plugins": {
           "basic-auth": {
               "username": "foo",
               "password": "bar"
           }
       }
   }'
   HTTP/1.1 200 OK
   ... ...
   
   # expect: OK
   $ curl http://127.0.0.1:9080/hello -H 'Authorization: Basic Zm9vOmJhcg==' -i
   HTTP/1.1 200 OK
   ... ...
   ```

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1366: bug:

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1366: bug: 
URL: https://github.com/apache/incubator-apisix/issues/1366#issuecomment-608238748
 
 
   need a title for this issue @csluoqi 

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] csluoqi commented on issue #1366: bug:

Posted by GitBox <gi...@apache.org>.
csluoqi commented on issue #1366: bug: 
URL: https://github.com/apache/incubator-apisix/issues/1366#issuecomment-608980139
 
 
   
   
   
   
   | |
   csluoqi
   |
   |
   csluoqi@126.com
   |
   签名由网易邮箱大师定制
   1.
   the uris is available
   
   
   2.password is 1234567890
   
   
   3.password is 1234567890 get this result
   if password is bar   result issuccess
   
   
   I tried the old password bar again. He actually can use it normally, so the problem may not be that the number cannot be used as the password, but the password cannot be changed. But after deleting the basic auth, the router can be used. After adding the new basic auth, it is invalid. You must use the username and password set by the previous basic auth.
   我又尝试了旧的密码 bar 他居然可以正常使用,所以问题可能不是不能使用数字作为密码,而是密码不能被修改。但是删basic auth之后router有可以用了,加了新的basic auth之后,是无效的,必须使用之前的basic auth 设置的用户名密码.
   
   
   [root@localhost ]# apisix version
   1.1
   
   
   On 4/3/2020 10:32,Wen Ming<no...@github.com> wrote:
   
   @csluoqi Can you provide an example of a reproduction? I tested the digital password and it didn't come up.
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub, or unsubscribe.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis closed issue #1366: bug:

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


   


----------------------------------------------------------------
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] [incubator-apisix] membphis commented on issue #1366: bug:

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


   I think we can close this issue, we do not get a reply from the author for a long time.


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