mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 14:26:10 -04:00
Merge branch 'master' into auto-permissions2
This commit is contained in:
commit
f1211913e5
3 changed files with 23 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||
`malformed` error to be received from the ACME server.
|
||||
* Linode DNS plugin now supports api keys created from their new panel
|
||||
at [cloud.linode.com](https://cloud.linode.com)
|
||||
* Adding a warning noting that future versions of Certbot will automatically configure the
|
||||
webserver so that all requests redirect to secure HTTPS access. You can control this
|
||||
behavior and disable this warning with the --redirect and --no-redirect flags.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
|||
|
|
@ -549,6 +549,11 @@ class Client(object):
|
|||
if ask_redirect:
|
||||
if config_name == "redirect" and config_value is None:
|
||||
config_value = enhancements.ask(enhancement_name)
|
||||
if not config_value:
|
||||
logger.warning("Future versions of Certbot will automatically "
|
||||
"configure the webserver so that all requests redirect to secure "
|
||||
"HTTPS access. You can control this behavior and disable this "
|
||||
"warning with the --redirect and --no-redirect flags.")
|
||||
if config_value:
|
||||
self.apply_enhancement(domains, enhancement_name, option)
|
||||
enhanced = True
|
||||
|
|
|
|||
|
|
@ -564,6 +564,21 @@ class EnhanceConfigTest(ClientTestCommon):
|
|||
self.assertEqual(mock_log.warning.call_args[0][1],
|
||||
'redirect')
|
||||
|
||||
@mock.patch("certbot.client.logger")
|
||||
def test_config_set_no_warning_redirect(self, mock_log):
|
||||
self.config.redirect = False
|
||||
self._test_with_already_existing()
|
||||
self.assertFalse(mock_log.warning.called)
|
||||
|
||||
@mock.patch("certbot.client.enhancements.ask")
|
||||
@mock.patch("certbot.client.logger")
|
||||
def test_warn_redirect(self, mock_log, mock_ask):
|
||||
self.config.redirect = None
|
||||
mock_ask.return_value = False
|
||||
self._test_with_already_existing()
|
||||
self.assertTrue(mock_log.warning.called)
|
||||
self.assertTrue("disable" in mock_log.warning.call_args[0][0])
|
||||
|
||||
def test_no_ask_hsts(self):
|
||||
self.config.hsts = True
|
||||
self._test_with_all_supported()
|
||||
|
|
|
|||
Loading…
Reference in a new issue