Skip to content

Commit

Permalink
fix #5, base64 secret was parsed with an ending \n
Browse files Browse the repository at this point in the history
When I was executing the test suite I encountered the same issue as described in issue #5. Base64 secret was parsed with an ending \n.
I don't know what happened under the hood (I tried with or without breaking line in the Yaml, I tested different line separators for the Yaml file... This seems to be linked with the way base64 decoding is done.).
  • Loading branch information
julienkosinski authored and aureq committed Sep 15, 2022
1 parent 05b03fd commit 6274f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (s *ovhDNSProviderSolver) secret(ref corev1.SecretKeySelector, namespace st
if !ok {
return "", fmt.Errorf("key not found %q in secret '%s/%s'", ref.Key, namespace, ref.Name)
}
return string(bytes), nil
return strings.TrimSuffix(string(bytes), "\n"), nil
}

// Present is responsible for actually presenting the DNS record with the
Expand Down

0 comments on commit 6274f6e

Please sign in to comment.