From 0dd8f47196c5dd69f9d1148d6347bad4fc1a5889 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 12 Sep 2024 15:36:34 +0200 Subject: [PATCH] Ignore inline comment when parsing cloud provider config The password can contain # or ; characters. These caused the parser to drop the password part after the "comment" character and thereby break authentication. --- internal/openstack/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/openstack/client.go b/internal/openstack/client.go index 6f17793f..2285bbaa 100644 --- a/internal/openstack/client.go +++ b/internal/openstack/client.go @@ -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 }