Skip to content

Commit 8802300

Browse files
authored
ABAP: Better logging #2 (#5502)
1 parent 21d1f37 commit 8802300

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/abap/build/connector.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ func (conn *Connector) GetToken(appendum string) error {
7676
log.RegisterSecret(token)
7777

7878
for _, cookie := range response.Header.Values("Set-Cookie") {
79-
if strings.HasPrefix(cookie, "SAP_SESSIONID_") {
80-
// SAP_SESSIONID_SID_123=YiWizhmMljBNOkKxJkG-flmT9wWfetHwifb6Fj5zqUI%3d; path=/; secure; HttpOnly
81-
id := cookie[strings.Index(cookie, "=")+1 : strings.Index(cookie, "; ")]
82-
log.RegisterSecret(id)
79+
if strings.HasPrefix(cookie, "SAP_SESSIONID_") || strings.HasPrefix(cookie, "sap-XSRF_") {
80+
nameValuePair, _, _ := strings.Cut(cookie, "; ")
81+
_, cookieValue, _ := strings.Cut(nameValuePair, "=")
82+
log.RegisterSecret(cookieValue)
8383
}
8484
}
8585

0 commit comments

Comments
 (0)