Skip to content

CLOUDP-60961: Invalid encoding when generating secure key #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

gssbzn
Copy link
Collaborator

@gssbzn gssbzn commented Apr 17, 2020

Proposed changes

Jira ticket: CLOUDP-60961

Checklist

  • I have run make fmt and formatted my code

@gssbzn gssbzn requested a review from andreaangiolillo April 17, 2020 12:15
@@ -41,6 +41,5 @@ func generateRandomASCIIString(length int) (string, error) {

func generateRandomBase64String(length int) (string, error) {
result, err := generateRandomASCIIString(length)
return base64.URLEncoding.EncodeToString([]byte(result))[:length], err

return base64.StdEncoding.EncodeToString([]byte(result))[:length], err
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLEncoding allows for - which is not valid for the automation agent, this should fix that

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gssbzn gssbzn merged commit 9ca72d1 into master Apr 17, 2020
@gssbzn gssbzn deleted the CLOUDP-60961 branch April 17, 2020 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants