Skip to content

Commit

Permalink
Ignore inline comment when parsing cloud provider config (#412)
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 authored Sep 12, 2024
1 parent 4ed6629 commit c1c11bd
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 c1c11bd

Please sign in to comment.