Skip ToS agreement question if ToS value is None (#9245)

* Skip ToS agreement question if ToS value is None

* Add changelog entry

* Typo in CHANGELOG

Co-authored-by: ohemorange <ebportnoy@gmail.com>

* Typo in CHANGELOG

Co-authored-by: ohemorange <ebportnoy@gmail.com>

Co-authored-by: ohemorange <ebportnoy@gmail.com>
This commit is contained in:
osirisinferi 2022-03-24 23:42:47 +01:00 committed by GitHub
parent 9ef6110e36
commit 1d45939cab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -906,7 +906,8 @@ class BackwardsCompatibleClientV2:
return regr_res
else:
client_v2 = cast(ClientV2, self.client)
if "terms_of_service" in client_v2.directory.meta:
if ("terms_of_service" in client_v2.directory.meta and
client_v2.directory.meta.terms_of_service is not None):
_assess_tos(client_v2.directory.meta.terms_of_service)
regr = regr.update(terms_of_service_agreed=True)
return client_v2.new_account(regr)

View file

@ -17,6 +17,11 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
* Certbot for Windows has been upgraded to use Python 3.9.11, in response to
https://www.openssl.org/news/secadv/20220315.txt.
* Previously, when Certbot was in the process of registering a new ACME account
and the ACME server did not present any Terms of Service, the user was asked to
agree with a non-existent Terms of Service ("None"). This bug is now fixed, so
that if an ACME server does not provide any Terms of Service to agree with, the
user is not asked to agree to a non-existent Terms of Service any longer.
More details about these changes can be found on our GitHub repo.