Make sure that the required slash is present. (#802)

pull/806/head
Felix Fontein 2024-09-29 21:26:31 +03:00 committed by GitHub
parent 2d82f49adc
commit 5a2dff7b74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,3 @@
bugfixes:
- "acme_* modules - when querying renewal information, make sure to insert a slash between the base URL and the certificate identifier
(https://github.com/ansible-collections/community.crypto/issues/801, https://github.com/ansible-collections/community.crypto/pull/802)."

View File

@ -404,7 +404,7 @@ class ACMEClient(object):
if cert_id is None:
cert_id = compute_cert_id(self.backend, cert_info=cert_info, cert_filename=cert_filename, cert_content=cert_content)
url = '{base}{cert_id}'.format(base=self.directory.directory['renewalInfo'], cert_id=cert_id)
url = '{base}/{cert_id}'.format(base=self.directory.directory['renewalInfo'].rstrip('/'), cert_id=cert_id)
data, info = self.get_request(url, parse_json_result=True, fail_on_error=True, get_only=True)