diff --git a/sa/sa.go b/sa/sa.go index aa9a9fc54..da20f95df 100644 --- a/sa/sa.go +++ b/sa/sa.go @@ -1460,6 +1460,9 @@ func (ssa *SQLStorageAuthority) NewOrder(ctx context.Context, req *corepb.Order) // Update the request with the created timestamp from the model createdTS := order.Created.UnixNano() req.Created = &createdTS + // A new order is never processing because it can't have been finalized yet + processingStatus := false + req.BeganProcessing = &processingStatus // If the OrderReadyStatus feature is enabled we need to calculate the order // status before returning it. Since it may have reused all valid @@ -1478,9 +1481,6 @@ func (ssa *SQLStorageAuthority) NewOrder(ctx context.Context, req *corepb.Order) pendingStatus := string(core.StatusPending) req.Status = &pendingStatus } - // A new order is never processing because it can't have been finalized yet - processingStatus := false - req.BeganProcessing = &processingStatus // Return the new order return req, nil } diff --git a/test/v2_integration.py b/test/v2_integration.py index f0c51fdfa..ae9143fea 100644 --- a/test/v2_integration.py +++ b/test/v2_integration.py @@ -115,6 +115,16 @@ def test_bad_overlap_wildcard(): chisel2.expect_problem("urn:ietf:params:acme:error:malformed", lambda: chisel2.auth_and_issue(["*.example.com", "www.example.com"])) +def test_duplicate_orders(): + """ + Test that the same client issuing for the same domain names twice in a row + works without error. + """ + client = chisel2.make_client(None) + domains = [ random_domain() ] + chisel2.auth_and_issue(domains, client=client) + chisel2.auth_and_issue(domains, client=client) + def test_order_reuse_failed_authz(): """ Test that creating an order for a domain name, failing an authorization in