瀏覽代碼

HPCC-22658 Prevent line break in authorization token

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith 6 年之前
父節點
當前提交
40c14245ab
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      common/thorhelper/thorsoapcall.cpp
  2. 1 1
      thorlcr/activities/soapcall/thsoapcallslave.cpp

+ 1 - 1
common/thorhelper/thorsoapcall.cpp

@@ -1551,7 +1551,7 @@ private:
             if (url.userPasswordPair.length() > 0)
             {
                 StringBuffer authToken;
-                JBASE64_Encode(url.userPasswordPair.str(), url.userPasswordPair.length(), authToken);
+                JBASE64_Encode(url.userPasswordPair.str(), url.userPasswordPair.length(), authToken, false);
                 request.append("Authorization: Basic ").append(authToken).append("\r\n");
             }
             else if (master->authToken.length() > 0)

+ 1 - 1
thorlcr/activities/soapcall/thsoapcallslave.cpp

@@ -28,7 +28,7 @@ static StringBuffer &buildAuthToken(IUserDescriptor *userDesc, StringBuffer &aut
     userDesc->getUserName(uidpair);
     uidpair.append(":");
     userDesc->getPassword(uidpair);
-    JBASE64_Encode(uidpair.str(), uidpair.length(), authToken);
+    JBASE64_Encode(uidpair.str(), uidpair.length(), authToken, false);
     return authToken;
 }