Skip to content

Commit

Permalink
Don't overwrite order.status.url if return Order's URI is empty
Browse files Browse the repository at this point in the history
Signed-off-by: James Munnelly <james@munnelly.eu>
  • Loading branch information
munnerz committed Dec 3, 2019
1 parent 9d28261 commit 1f3b883
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controller/acmeorders/sync.go
Expand Up @@ -231,7 +231,12 @@ func (c *controller) updateOrderStatus(ctx context.Context, cl acmecl.Interface,
}

log.V(logf.DebugLevel).Info("Retrieved ACME order from server", "raw_data", acmeOrder)
o.Status.URL = acmeOrder.URI
// Workaround bug in golang.org/x/crypto/acme implementation whereby the
// order's URI field will be empty when calling GetOrder due to the
// 'Location' header not being set on the response from the ACME server.
if acmeOrder.URI != "" {
o.Status.URL = acmeOrder.URI
}
o.Status.FinalizeURL = acmeOrder.FinalizeURL
c.setOrderState(&o.Status, acmeOrder.Status)
// only set the authorizations field if the lengths mismatch.
Expand Down

0 comments on commit 1f3b883

Please sign in to comment.