Skip to content

Commit 3f73ed9

Browse files
committed
Fix username@cluster:passwod is modified to cluster: username:passwod causes authentication failure
@see apache#8100
1 parent e0dbf48 commit 3f73ed9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/RestBaseController.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ public RedirectView redirectTo(HttpServletRequest request, TNetworkAddress addr)
7575
String userInfo = null;
7676
if (!Strings.isNullOrEmpty(request.getHeader("Authorization"))) {
7777
ActionAuthorizationInfo authInfo = getAuthorizationInfo(request);
78-
userInfo = authInfo.fullUserName + ":" + authInfo.password;
78+
// Fix username@cluster:passwod is modified to cluster: username:passwod causes authentication failure
79+
// @see https://github.com/apache/incubator-doris/issues/8100
80+
userInfo = ClusterNamespace.getNameFromFullName(authInfo.fullUserName) +
81+
"@" + ClusterNamespace.getClusterNameFromFullName(authInfo.fullUserName) +
82+
":" + authInfo.password;
7983
}
8084
try {
8185
urlObj = new URI(urlStr);

0 commit comments

Comments
 (0)