Skip to content

Commit

Permalink
Ignore inline comment when parsing cloud provider config
Browse files Browse the repository at this point in the history
The password can contain # or ; characters. These caused the parser to
drop the password part after the "comment" character and thereby break
authentication.
  • Loading branch information
MichaelEischer committed Sep 12, 2024
1 parent 4ed6629 commit 0dd8f47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/openstack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ func getProvider(
overwrite OSClientOverwrite,
timeout time.Duration,
) (*gophercloud.ProviderClient, *gophercloud.EndpointOpts, error) {
cfg, err := ini.Load(iniData)
cfg, err := ini.LoadSources(
ini.LoadOptions{IgnoreInlineComment: true},
iniData,
)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 0dd8f47

Please sign in to comment.