[PR #11] [MERGED] fixed logic to check status from our challenge #658

Closed
opened 2025-12-29 01:28:20 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dehydrated-io/dehydrated/pull/11
Author: @germeier
Created: 12/6/2015
Status: Merged
Merged: 12/6/2015
Merged by: @lukas2511

Base: masterHead: fixpending


📝 Commits (1)

  • 76a3783 fixed logic to check status from our challenge

📊 Changes

1 file changed (+9 additions, -6 deletions)

View changed files

📝 letsencrypt.sh (+9 -6)

📄 Description

the old code had a problem and would interpret a challenge that
returned "pending" and then "invalid" as valid.

This code actually has another problem. The RFC defines:

"status (optional, string): The status of this authorization.
Possible values are: "pending", "valid", and "invalid". If this
field is missing, then the default value is "pending"."

So actually the correct way to implement this would be:

while -z "${status}" || ; do

But without further checks this might lead to an endless loop. So this
is "good enough(tm)". ;)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dehydrated-io/dehydrated/pull/11 **Author:** [@germeier](https://github.com/germeier) **Created:** 12/6/2015 **Status:** ✅ Merged **Merged:** 12/6/2015 **Merged by:** [@lukas2511](https://github.com/lukas2511) **Base:** `master` ← **Head:** `fixpending` --- ### 📝 Commits (1) - [`76a3783`](https://github.com/dehydrated-io/dehydrated/commit/76a37834be8b55d5afae5d0d164e3bf2358e9916) fixed logic to check status from our challenge ### 📊 Changes **1 file changed** (+9 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `letsencrypt.sh` (+9 -6) </details> ### 📄 Description the old code had a problem and would interpret a challenge that returned "pending" and then "invalid" as valid. This code actually has another problem. The RFC defines: "status (optional, string): The status of this authorization. Possible values are: "pending", "valid", and "invalid". If this field is missing, then the default value is "pending"." So actually the correct way to implement this would be: while [[ -z "${status}" ]] || [[ "${status}" = "pending" ]]; do But without further checks this might lead to an endless loop. So this is "good enough(tm)". ;) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 01:28:20 +01:00
adam closed this issue 2025-12-29 01:28:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#658