Skip to content

feat(login): fixed permission for ovh.conf in login#185

Merged
amstuta merged 3 commits into
mainfrom
dev/olivierdubo/login
May 12, 2026
Merged

feat(login): fixed permission for ovh.conf in login#185
amstuta merged 3 commits into
mainfrom
dev/olivierdubo/login

Conversation

@duboolivier
Copy link
Copy Markdown
Contributor

@duboolivier duboolivier commented May 11, 2026

Description

fixed permission for ovh.conf in login

Fixes #178 (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (improvement of existing commands)
  • Breaking change (fix or feature that can break a current behavior)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code
  • I ran go mod tidy
  • I have added tests that prove my fix is effective or that my feature works

Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
@duboolivier duboolivier requested a review from a team as a code owner May 11, 2026 15:28
Comment thread internal/services/login/login.go Outdated
}
}

if err := os.Chmod(flags.CliConfigPath, 0600); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we should modify the file permissions only if we're creating it, not if the file already exists. I think the best option would be a defer func to do this chmod at the end of the if block that begins on line 39.

Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
@amstuta amstuta merged commit a9968aa into main May 12, 2026
7 checks passed
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.

[Bug]: ovhcloud login creates .ovh.conf with world-readable permission despite containing secret credentials

2 participants