Skip to content

Commit

Permalink
2.7.3 prep (#9817)
Browse files Browse the repository at this point in the history
* Update changelog for 2.7.2 release

* Release 2.7.2

* helpful: Add an edge case for arguments w/ contained spaces (#9813)

Fixes #9811

(cherry picked from commit 3ae9d7e)

* fixes #9805 (#9816)

(cherry picked from commit d157728)

---------

Co-authored-by: Will Greenberg <willg@eff.org>
  • Loading branch information
bmw and wgreenberg committed Oct 24, 2023
1 parent e407419 commit 5bf833f
Show file tree
Hide file tree
Showing 24 changed files with 57 additions and 22 deletions.
2 changes: 1 addition & 1 deletion acme/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'cryptography>=3.2.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-apache/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
# We specify the minimum acme and certbot version as the current plugin
Expand Down
2 changes: 1 addition & 1 deletion certbot-compatibility-test/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'certbot',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-cloudflare/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'cloudflare>=1.5.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-digitalocean/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'python-digitalocean>=1.11', # 1.15.0 or newer is recommended for TTL support
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-dnsimple/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
# This version of lexicon is required to address the problem described in
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-dnsmadeeasy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.14.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-gehirn/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.14.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-google/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'google-api-python-client>=1.6.5',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-linode/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.14.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-luadns/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.14.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-nsone/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.14.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-ovh/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.15.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-rfc2136/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dnspython>=1.15.0',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-route53/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'boto3>=1.15.15',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-sakuracloud/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
'dns-lexicon>=3.14.1',
Expand Down
2 changes: 1 addition & 1 deletion certbot-nginx/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages
from setuptools import setup

version = '2.7.1'
version = '2.7.2'

install_requires = [
# We specify the minimum acme and certbot version as the current plugin
Expand Down
13 changes: 12 additions & 1 deletion certbot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

Certbot adheres to [Semantic Versioning](https://semver.org/).

## 2.7.2 - master
## 2.7.3 - master

### Fixed

* 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.

## 2.7.2 - 2023-10-19

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion certbot/certbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import warnings

# version number like 1.2.3a0, must have at least 2 parts, like 1.2
__version__ = '2.7.1'
__version__ = '2.7.2'

if sys.version_info[:2] == (3, 7):
warnings.warn(
Expand Down
2 changes: 2 additions & 0 deletions certbot/certbot/_internal/cli/helpful.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def update_result(settings_dict: Dict[str, Tuple[configargparse.Action, str]],

if '=' in arg:
arg = arg.split('=')[0]
elif ' ' in arg:
arg = arg.split(' ')[0]

if arg.startswith('--'):
args.append(arg)
Expand Down
5 changes: 4 additions & 1 deletion certbot/certbot/_internal/renewal.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def restore_required_config_elements(config: configuration.NamespaceConfig,
"""

updated_values = {}
required_items = itertools.chain(
(("pref_challs", _restore_pref_challs),),
zip(BOOL_CONFIG_ITEMS, itertools.repeat(_restore_bool)),
Expand All @@ -202,7 +203,9 @@ def restore_required_config_elements(config: configuration.NamespaceConfig,
for item_name, restore_func in required_items:
if item_name in renewalparams and not config.set_by_user(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]:
Expand Down
7 changes: 7 additions & 0 deletions certbot/certbot/_internal/tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,13 @@ def test_adjacent_short_args(self):
assert_set_by_user_with_value(namespace, 'text_mode', True)
assert_set_by_user_with_value(namespace, 'verbose_count', 1)
assert_set_by_user_with_value(namespace, 'email', 'foo@example.com')

def test_arg_with_contained_spaces(self):
# This can happen if a user specifies an arg like "-d foo.com" enclosed
# in double quotes, or as its own line in a docker-compose.yml file (as
# in #9811)
namespace = self.parse(['certonly', '-d foo.com'])
assert_set_by_user_with_value(namespace, 'domains', ['foo.com'])

if __name__ == '__main__':
sys.exit(pytest.main(sys.argv[1:] + [__file__])) # pragma: no cover
12 changes: 12 additions & 0 deletions certbot/certbot/_internal/tests/renewal_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ def test_ancient_server_renewal_conf(self, mock_set_by_user):
self._call(self.config, {'server': constants.V1_URI})
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):
"""Tests for certbot._internal.renewal._renew_describe_results."""
Expand Down
4 changes: 2 additions & 2 deletions certbot/docs/cli-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ manage your account:
--agree-tos Agree to the ACME server's Subscriber Agreement
-m EMAIL Email address for important account notifications

optional arguments:
options:
-h, --help show this help message and exit
-c CONFIG_FILE, --config CONFIG_FILE
path to config file (default: /etc/letsencrypt/cli.ini
Expand Down Expand Up @@ -122,7 +122,7 @@ optional arguments:
case, and to know when to deprecate support for past
Python versions and flags. If you wish to hide this
information from the Let's Encrypt server, set this to
"". (default: CertbotACMEClient/2.7.1 (certbot;
"". (default: CertbotACMEClient/2.7.2 (certbot;
OS_NAME OS_VERSION) Authenticator/XXX Installer/YYY
(SUBCOMMAND; flags: FLAGS) Py/major.minor.patchlevel).
The flags encoded in the user agent are: --duplicate,
Expand Down

0 comments on commit 5bf833f

Please sign in to comment.