ctrlaltcoop / certbot-dns-hetzner

Certbot plugin enabling dns-01 challenge on the Hetzner DNS API
Other
155 stars 24 forks source link

Fix bug not properly deleting entries during cleanup #2 #3

Closed l0rn closed 4 years ago

l0rn commented 4 years ago

Turns out a stateful authenticator can lead to problems. In this case having multiple domains to challenge would overwrite record_id, meaning that during cleanup only one id will actually be deleting.

We are now resorting to a stateless call with only domain name and record name. We resolve the correct record id by iterating hetzners responses.

Fixes #2

codecov[bot] commented 4 years ago

Codecov Report

Merging #3 into master will increase coverage by 10.35%. The diff coverage is 92.85%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master       #3       +/-   ##
===========================================
+ Coverage   83.03%   93.38%   +10.35%     
===========================================
  Files           3        3               
  Lines         112      121        +9     
===========================================
+ Hits           93      113       +20     
+ Misses         19        8       -11     
Flag Coverage Δ
#unittests 93.38% <92.85%> (+10.35%) :arrow_up:
Impacted Files Coverage Δ
certbot_dns_hetzner/dns_hetzner.py 89.74% <85.71%> (-2.15%) :arrow_down:
certbot_dns_hetzner/fakes.py 100.00% <100.00%> (ø)
certbot_dns_hetzner/hetzner_client.py 94.36% <100.00%> (+18.24%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 34aed9b...138c6d6. Read the comment docs.