Skip to content

Commit 94733de

Browse files
committed
it seems this is not base64 encoded
1 parent 37743a4 commit 94733de

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/jetstream/plugins/cfappssh/app_ssh.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cfappssh
22

33
import (
44
"crypto/tls"
5-
"encoding/base64"
65
"encoding/json"
76
"errors"
87
"fmt"
@@ -118,16 +117,11 @@ func (cfAppSsh *CFAppSSH) appSSH(c echo.Context) error {
118117
if err != nil {
119118
return sendSSHError("Couldn't get refresh token for CNSI with GUID %s", cnsiRecord.GUID)
120119
}
121-
tokenBytes, err := base64.StdEncoding.DecodeString(refreshedTokenRec.AuthToken)
122-
if err != nil {
123-
return sendSSHError("Couldn't get auth token for CNSI with GUID %s", cnsiRecord.GUID)
124-
}
125-
126120
// use processID instead of appGUID if we detect V3 availability. V3 apps can have multiple containers within one instance and therefore cannot use the appGUID
127121
// because that appGUID could wrap multiple processIDs each with their own option to connect.
128122
// Until full V3 support is added, this will allow targetting the WEB process only. This is not a limitation of the go code. It intentionally left out for now because
129123
// the UI does not provide an option to choose the nested process container.
130-
appOrProcessGUID, err = CheckForV3AvailabilityAndReturnProcessID(appOrProcessGUID, apiEndpoint.String(), cnsiRecord.ClientId, string(tokenBytes), p.GetHttpClient(cnsiRecord.SkipSSLValidation, cnsiRecord.CACert))
124+
appOrProcessGUID, err = CheckForV3AvailabilityAndReturnProcessID(appOrProcessGUID, apiEndpoint.String(), cnsiRecord.ClientId, string(refreshedTokenRec.AuthToken), p.GetHttpClient(cnsiRecord.SkipSSLValidation, cnsiRecord.CACert))
131125
if err != nil {
132126
return sendSSHError("Failed checking for v3 app: %s", err)
133127
}

0 commit comments

Comments
 (0)