From ea3677d6bb1b999a915371ea77034c88e9a1782f Mon Sep 17 00:00:00 2001 From: cyon13 Date: Mon, 15 Jan 2024 15:02:36 +0900 Subject: [PATCH 1/4] =?UTF-8?q?username=20url=20encoding=20=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scala/org/apache/kyuubi/service/ServiceUtils.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala index 955144af847..d81841b5add 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala @@ -18,9 +18,10 @@ package org.apache.kyuubi.service import java.io.{Closeable, IOException} - import org.slf4j.Logger +import java.net.URLEncoder + object ServiceUtils { /** @@ -50,7 +51,9 @@ object ServiceUtils { if (indexOfDomainMatch <= 0) { userName } else { - userName.substring(0, indexOfDomainMatch) + val encodedUserName = URLEncoder.encode(userName, "UTF-8") + encodedUserName + // userName.substring(0, indexOfDomainMatch) } } From 357da407d7d8a8304421f5e71b49200796f78e12 Mon Sep 17 00:00:00 2001 From: cyon13 Date: Mon, 15 Jan 2024 15:35:45 +0900 Subject: [PATCH 2/4] =?UTF-8?q?scalaviolation=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala index d81841b5add..31c4cafc801 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala @@ -18,6 +18,7 @@ package org.apache.kyuubi.service import java.io.{Closeable, IOException} + import org.slf4j.Logger import java.net.URLEncoder From 475bb5ea1fb2dedb1d6020a9c5ce16e33d601ac7 Mon Sep 17 00:00:00 2001 From: cyon13 Date: Mon, 15 Jan 2024 15:39:56 +0900 Subject: [PATCH 3/4] =?UTF-8?q?scalaviolation=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/scala/org/apache/kyuubi/service/ServiceUtils.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala index 31c4cafc801..6d128e70f11 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala @@ -18,11 +18,10 @@ package org.apache.kyuubi.service import java.io.{Closeable, IOException} +import java.net.URLEncoder import org.slf4j.Logger -import java.net.URLEncoder - object ServiceUtils { /** @@ -52,8 +51,7 @@ object ServiceUtils { if (indexOfDomainMatch <= 0) { userName } else { - val encodedUserName = URLEncoder.encode(userName, "UTF-8") - encodedUserName + URLEncoder.encode(userName, "UTF-8") // userName.substring(0, indexOfDomainMatch) } } From b2d97cae3aab70837b449cc005f7b8acbcab1553 Mon Sep 17 00:00:00 2001 From: cyon13 Date: Mon, 15 Jan 2024 17:00:13 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala index 6d128e70f11..101eadb8988 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ServiceUtils.scala @@ -52,7 +52,6 @@ object ServiceUtils { userName } else { URLEncoder.encode(userName, "UTF-8") - // userName.substring(0, indexOfDomainMatch) } }