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/01 09:49:42 UTC

[GitHub] [apisix] anjia0532 opened a new issue #4513: bug: nacos discovery not support base auth include `%` chars.

anjia0532 opened a new issue #4513:
URL: https://github.com/apache/apisix/issues/4513


   ### Issue description
   e.g. discovery.nacos.host will be `"http://${username}:${password}@${host1}:${port1}"` ,if username or passowrd has `@` should be replace `%40` (ref https://stackoverflow.com/a/6718568) 
   
   but apsix 2.7 regular expression is `[a-zA-Z0-9-_.:\@]`
   https://github.com/apache/apisix/blob/174044e60cfbad6f8aa023200f3be145f5249ed1/apisix/discovery/nacos.lua#L45
   
   will throw exception 
   ```
   2021/07/01 09:27:09 [error] 54#54: init_worker_by_lua error: /usr/local/apisix/apisix/discovery/nacos.lua:312: invalid nacos configuration: property "host" validation failed: failed to validate item 1: failed to match pattern "^http(s)?:\\/\\/[a-zA-Z0-9-_.:\\@]+$" with "https://admin:%40123%40@nacos.xxx.xxx:443"
   ```
   
   ### Environment
   
   Bug report without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`): 2.7-alpine
   * OS (cmd: `uname -a`): ubuntu 16.04 LTS
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   ### Minimal test code / Steps to reproduce the issue
   
   Bug report without steps to reproduce will be ignored or closed.
   
   1.
   2.
   3.
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   ### 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.

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 #4513: bug: nacos discovery not support base auth include `%` chars.

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


   Thanks for your report. 
   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] spacewander commented on issue #4513: bug: nacos discovery not support base auth include `%` chars.

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


   We can fix the regex.


-- 
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] anjia0532 commented on issue #4513: bug: nacos discovery not support base auth include `%` chars.

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


   @spacewander  thanks


-- 
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] Yiyiyimu closed issue #4513: bug: nacos discovery not support base auth include `%` chars.

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


   


-- 
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] Yiyiyimu closed issue #4513: bug: nacos discovery not support base auth include `%` chars.

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


   


-- 
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] Yiyiyimu closed issue #4513: bug: nacos discovery not support base auth include `%` chars.

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


   


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