mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 00:22:04 +02:00
@@ -15,6 +15,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
* Fixed a bug where arguments with contained spaces weren't being handled correctly
|
* Fixed a bug where arguments with contained spaces weren't being handled correctly
|
||||||
|
* Fixed a bug that caused the ACME account to not be properly restored on
|
||||||
|
renewal causing problems in setups where the user had multiple accounts with
|
||||||
|
the same ACME server.
|
||||||
|
|
||||||
More details about these changes can be found on our GitHub repo.
|
More details about these changes can be found on our GitHub repo.
|
||||||
|
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ def restore_required_config_elements(config: configuration.NamespaceConfig,
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
updated_values = {}
|
||||||
required_items = itertools.chain(
|
required_items = itertools.chain(
|
||||||
(("pref_challs", _restore_pref_challs),),
|
(("pref_challs", _restore_pref_challs),),
|
||||||
zip(BOOL_CONFIG_ITEMS, itertools.repeat(_restore_bool)),
|
zip(BOOL_CONFIG_ITEMS, itertools.repeat(_restore_bool)),
|
||||||
@@ -202,7 +203,9 @@ def restore_required_config_elements(config: configuration.NamespaceConfig,
|
|||||||
for item_name, restore_func in required_items:
|
for item_name, restore_func in required_items:
|
||||||
if item_name in renewalparams and not config.set_by_user(item_name):
|
if item_name in renewalparams and not config.set_by_user(item_name):
|
||||||
value = restore_func(item_name, renewalparams[item_name])
|
value = restore_func(item_name, renewalparams[item_name])
|
||||||
setattr(config, item_name, value)
|
updated_values[item_name] = value
|
||||||
|
for key, value in updated_values.items():
|
||||||
|
setattr(config, key, value)
|
||||||
|
|
||||||
|
|
||||||
def _remove_deprecated_config_elements(renewalparams: Mapping[str, Any]) -> Dict[str, Any]:
|
def _remove_deprecated_config_elements(renewalparams: Mapping[str, Any]) -> Dict[str, Any]:
|
||||||
|
|||||||
@@ -253,6 +253,18 @@ class RestoreRequiredConfigElementsTest(test_util.ConfigTestCase):
|
|||||||
self._call(self.config, {'server': constants.V1_URI})
|
self._call(self.config, {'server': constants.V1_URI})
|
||||||
assert self.config.server == constants.CLI_DEFAULTS['server']
|
assert self.config.server == constants.CLI_DEFAULTS['server']
|
||||||
|
|
||||||
|
def test_related_values(self):
|
||||||
|
# certbot.configuration.NamespaceConfig.set_by_user considers some values as related to each
|
||||||
|
# other and considers both set by the user if either is. This test ensures all renewal
|
||||||
|
# parameters are restored regardless of their restoration order or relation between values.
|
||||||
|
# See https://github.com/certbot/certbot/issues/9805 for more info.
|
||||||
|
renewalparams = {
|
||||||
|
'server': 'https://example.org',
|
||||||
|
'account': 'somehash',
|
||||||
|
}
|
||||||
|
self._call(self.config, renewalparams)
|
||||||
|
self.assertEqual(self.config.account, renewalparams['account'])
|
||||||
|
|
||||||
|
|
||||||
class DescribeResultsTest(unittest.TestCase):
|
class DescribeResultsTest(unittest.TestCase):
|
||||||
"""Tests for certbot._internal.renewal._renew_describe_results."""
|
"""Tests for certbot._internal.renewal._renew_describe_results."""
|
||||||
|
|||||||
Reference in New Issue
Block a user