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 2021/07/27 06:17:57 UTC

[GitHub] [apisix] liuxiran opened a new issue #4680: bug: It should return 400 when update consumer with mismatched username in path and body

liuxiran opened a new issue #4680:
URL: https://github.com/apache/apisix/issues/4680


   ### Issue description
   
   ### Environment
   
   Bug report without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`): 2.7
   * OS (cmd: `uname -a`): Darwin Kernel Version 20.3.0
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 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
   * apisix-dashboard version, if have: NAN
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`): NAN
   
   ### Minimal test code / Steps to reproduce the issue
   
   Bug report without steps to reproduce will be ignored or closed.
   
   1. I have a consumer, username is `user`
   ![image](https://user-images.githubusercontent.com/2561857/127104736-14b3db3a-e2a1-4a7d-8af3-650ebd46bb35.png)
   
   
   2. when I update this consumer by admin-api used mismatched username in path  and body, update successfully
   
   ![image](https://user-images.githubusercontent.com/2561857/127104557-796367de-8b32-45c7-bb51-b08bd0ee2e19.png)
   
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   ### What's the expected result?
   
   IMO it should return HTTP code 400 when call admin-api to update consumer with mismatched username in path and body or user will get confused.
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tokers closed issue #4680: bug: It should return 400 when update consumer with mismatched username in path and body

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


   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] okaybase commented on issue #4680: bug: It should return 400 when update consumer with mismatched username in path and body

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


   [https://github.com/apache/apisix/pull/4756](url) @spacewander @liuxiran 


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] spacewander commented on issue #4680: bug: It should return 400 when update consumer with mismatched username in path and body

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


   Yes. We can add similar check like
   https://github.com/apache/apisix/blob/20df78432dc9447c7a1c2f63c1cd53a1a641a3fa/apisix/admin/routes.lua#L46
   
   PR is welcome!


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] okaybase commented on issue #4680: bug: It should return 400 when update consumer with mismatched username in path and body

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


   [https://github.com/apache/apisix/pull/4756](url) @spacewander @liuxiran 


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] liuxiran commented on issue #4680: bug: It should return 400 when update consumer with mismatched username in path and body

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


   > Yes. We can add similar check like
   > https://github.com/apache/apisix/blob/20df78432dc9447c7a1c2f63c1cd53a1a641a3fa/apisix/admin/routes.lua#L46
   > 
   > PR is welcome!
   
   Thanks a lot~


-- 
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: notifications-unsubscribe@apisix.apache.org

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