mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
[PR #293] [MERGED] Skip challenge for already validated domains #791
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dehydrated-io/dehydrated/pull/293
Author: @sth
Created: 10/8/2016
Status: ✅ Merged
Merged: 12/18/2016
Merged by: @lukas2511
Base:
master← Head:skip-validated📝 Commits (2)
c5f6045skip challenge for already validated domainse49c7dfonly call deploy_challenge hook if there is work📊 Changes
1 file changed (+22 additions, -5 deletions)
View changed files
📝
dehydrated(+22 -5)📄 Description
For domains that are already validated we don't need to fulfill further challenges.
If a challenge request for a domain returns
"status": "valid"no further validation is required and further processing is skipped. Skipping this further processing also avoids parsing problems when the challenge response contains additional fields, for example describing a previous successful DNS challenge.The new variable
${challenge_altnames}is used to keep track of the names that are not validated yet and still need do the challenge. When later iterating over this possibly empty array a:0substring expansion has to be used to avoid bash complaining about an unbound variable (it treats empty arrays as unset).This solves the same problem as pull request #283, hopefully in a more robust way.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.