-
Notifications
You must be signed in to change notification settings - Fork 0
OCM-18684 | fix: Remove proxy's special characters value to avoid mee… #3
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -741,7 +741,9 @@ func (ch *clusterHandler) GenerateClusterCreateFlags() ([]string, error) { | |||||||||
| log.Logger.Infof("Proxy auth is enabled. Going to generate the user and password and record in %s", | ||||||||||
| config.Test.ProxyAuthFile) | ||||||||||
| username := "proxyuser" | ||||||||||
| _, password := resourcesHandler.PrepareAdminUser() | ||||||||||
|
|
||||||||||
| // Remove all special characters, keep only alphanumeric characters | ||||||||||
| password := helper.GenerateRandomString(10) | ||||||||||
|
Comment on lines
+745
to
+746
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change introduces a call to Additionally, the comment is slightly inaccurate. It says
Suggested change
|
||||||||||
| _, err = helper.CreateFileWithContent(config.Test.ProxyAuthFile, fmt.Sprintf("%s:%s", username, password)) | ||||||||||
| if err != nil { | ||||||||||
| return flags, err | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability and maintainability, it's better to define the password length as a constant instead of using a magic number
10.