Skip to content

Commit

Permalink
[minor_changes] Added support for double quotes to be available in pa…
Browse files Browse the repository at this point in the history
…ssword string.
  • Loading branch information
anvitha-jain authored and lhercot committed Apr 5, 2024
1 parent 6f9c0eb commit 53a65bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ func (c *Client) Authenticate() error {
// (2) escapes out the password to support scenarios where the user password includes backslashes
escUserName := strings.ReplaceAll(c.username, `\`, `\\`)
escPwd := strings.ReplaceAll(c.password, `\`, `\\`)
escPwd = strings.ReplaceAll(escPwd, `"`, `\"`)
body := []byte(fmt.Sprintf(authPayload, escUserName, escPwd))
if c.appUserName != "" {
path = "/api/requestAppToken.json"
Expand Down

0 comments on commit 53a65bd

Please sign in to comment.