Skip to content

Commit

Permalink
Handle potential case when tos can be null
Browse files Browse the repository at this point in the history
This commit fixes a case where tos can be null which we get from an ACME provider. In the database we keep it as an empty string because this needs to go through the libraries we are using to generate an ACME certificate which can/cannot error out and unfortunately we don't have an ACME provider atm which gives a null tos to test a null case. Keeping it as an empty string in that case in database if tos received is null.
  • Loading branch information
sonicaj committed Sep 10, 2024
1 parent cd8c402 commit cc3da97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/plugins/acme_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def do_create(self, data):
self._config.datastore,
{
'uri': register.uri,
'tos': register.terms_of_service,
'tos': register.terms_of_service or '',
'new_account_uri': directory.newAccount,
'new_nonce_uri': directory.newNonce,
'new_order_uri': directory.newOrder,
Expand Down

0 comments on commit cc3da97

Please sign in to comment.