mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 16:12:09 +02:00
Avoid to delete both webroot_map and webroot_path (#7095)
* Always restore webroot_path in renewal config. * Add unit tests to ensure correct behavior * Add changelog * Add certbot as modified package
This commit is contained in:
committed by
Brad Warren
parent
d2a2b88090
commit
7d35f95293
+5
-5
@@ -106,11 +106,11 @@ def _restore_webroot_config(config, renewalparams):
|
||||
restoring logic is not able to correctly parse it from the serialized
|
||||
form.
|
||||
"""
|
||||
if "webroot_map" in renewalparams:
|
||||
if not cli.set_by_cli("webroot_map"):
|
||||
config.webroot_map = renewalparams["webroot_map"]
|
||||
elif "webroot_path" in renewalparams:
|
||||
logger.debug("Ancient renewal conf file without webroot-map, restoring webroot-path")
|
||||
if "webroot_map" in renewalparams and not cli.set_by_cli("webroot_map"):
|
||||
config.webroot_map = renewalparams["webroot_map"]
|
||||
# To understand why webroot_path and webroot_map processing are not mutually exclusive,
|
||||
# see https://github.com/certbot/certbot/pull/7095
|
||||
if "webroot_path" in renewalparams and not cli.set_by_cli("webroot_path"):
|
||||
wp = renewalparams["webroot_path"]
|
||||
if isinstance(wp, six.string_types): # prior to 0.1.0, webroot_path was a string
|
||||
wp = [wp]
|
||||
|
||||
Reference in New Issue
Block a user