mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
Fix --webroot-path action (#10509)
Fixes #10506. When --webroot-path was specified multiple times, Certbot was erroring with `DNSName SAN compared to non-SAN`. That's because, in the _WebrootPathAction that builds `namespace.webroot_path`, we were passing `domain` (type `san.DNSName`) as the keys. The other code that modifies or accesses `namespace.webroot_path` expects the keys to be of type `str`. In particular `webroot.Authenticator._set_webroots` does: ```python for achall in achalls: self.conf("map").setdefault(achall.domain, webroot_path) ``` Where `achall.domain` is a `str`. Two existing unittests would have caught this: `test_multiwebroot` and `test_webroot_map_partial_without_perform`. However, they faked out the parsing of the `--domains` flag, and that faked out code was not updated in #10468. Since this bug is caused by an interaction between the types produced by the `--domains` flag and those produced by the `--webroot-path` flag, the tests failed to catch the problem. I've updated the tests and confirmed that they fail before the fix is applied.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fixed a regression that caused certbot to crash if multiple --webroot-path values were set on the command line.
|
||||
Reference in New Issue
Block a user