You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2022/05/10 10:58:30 UTC

[shardingsphere] branch master updated: Fix the exception when user does not contain @ in the authority configuration. (#17512)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e60bd2428f9 Fix the exception when user does not contain @ in the authority configuration. (#17512)
e60bd2428f9 is described below

commit e60bd2428f9208833f817ba02cc6443ca48bc56b
Author: lanchengx <52...@users.noreply.github.com>
AuthorDate: Tue May 10 18:58:19 2022 +0800

    Fix the exception when user does not contain @ in the authority configuration. (#17512)
---
 .../authority/yaml/config/YamlAuthorityUserConfiguration.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/yaml/config/YamlAuthorityUserConfiguration.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/yaml/config/YamlAuthorityUserConfiguration.java
index 40782253ac7..2f6f393b17a 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/yaml/config/YamlAuthorityUserConfiguration.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/yaml/config/YamlAuthorityUserConfiguration.java
@@ -40,6 +40,6 @@ public final class YamlAuthorityUserConfiguration implements YamlConfiguration {
     
     @Override
     public String toString() {
-        return user + ":" + password;
+        return !user.contains("@") ? user + "@%:" + password : user + ":" + password;
     }
 }