From b31894d0e7e2061ce2114c6ed8696ae58615f91f Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Mon, 29 Oct 2018 06:11:26 -0700 Subject: [PATCH] Remove crufty old TODO from UpdateAuthorization. (#3910) At one point, the POST to a challenge object was in theory updating a resource, and might have a "Type" field. We considered adding a check that the "Type" field matched the stored "Type" field. In ACMEv2, the POST body is always simply `{}` so this check is irrelevant. And we're unlikely to change the behavior in ACMEv1, so let's get rid of the counter and TODO. --- ra/ra.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ra/ra.go b/ra/ra.go index 7c25924f4..fbc99d9f4 100644 --- a/ra/ra.go +++ b/ra/ra.go @@ -1428,16 +1428,6 @@ func (ra *RegistrationAuthorityImpl) UpdateAuthorization( ch := &authz.Challenges[challengeIndex] - if response.Type != "" && ch.Type != response.Type { - // TODO(riking): Check the rate on this, uncomment error return if negligible - ra.stats.Inc("StartChallengeWrongType", 1) - // return authz, berrors.MalformedError( - // "invalid challenge update: provided type was %s but actual type is %s", - // response.Type, - // ch.Type, - // ) - } - // If TLSSNIRevalidation is enabled, find out whether this was a revalidation // (previous certificate existed) or not. If it is a revalidation, we can // proceed with validation even though the challenge type is currently