This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 9caf9f1  feat(nacos): be compatible with password contains @ (#5420)
9caf9f1 is described below

commit 9caf9f18652b262b5b92fe671391cfd00dac3a24
Author: brianzhangrong <[email protected]>
AuthorDate: Mon Nov 8 10:21:08 2021 +0800

    feat(nacos): be compatible with password contains @ (#5420)
---
 apisix/discovery/nacos.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apisix/discovery/nacos.lua b/apisix/discovery/nacos.lua
index 2eee156..663309b 100644
--- a/apisix/discovery/nacos.lua
+++ b/apisix/discovery/nacos.lua
@@ -190,7 +190,7 @@ local function get_base_uri()
     local host = local_conf.discovery.nacos.host
     -- TODO Add health check to get healthy nodes.
     local url = host[math_random(#host)]
-    local auth_idx = str_find(url, '@')
+    local auth_idx = core.string.rfind_char(url, '@')
     local username, password
     if auth_idx then
         local protocol_idx = str_find(url, '://')

Reply via email to