@@ -768,7 +768,6 @@ func (wfe *WebFrontEndImpl) NewAccount(
768768 wfe .sendError (response , logEvent , probs .ServerInternal ("Error marshaling account" ), err )
769769 return
770770 }
771- prepAccountForDisplay (& acct )
772771
773772 err = wfe .writeJsonResponse (response , logEvent , http .StatusOK , acct )
774773 if err != nil {
@@ -895,8 +894,6 @@ func (wfe *WebFrontEndImpl) NewAccount(
895894 response .Header ().Add ("Link" , link (wfe .SubscriberAgreementURL , "terms-of-service" ))
896895 }
897896
898- prepAccountForDisplay (& acct )
899-
900897 err = wfe .writeJsonResponse (response , logEvent , http .StatusCreated , acct )
901898 if err != nil {
902899 // ServerInternal because we just created this account, and it
@@ -1197,24 +1194,6 @@ func (wfe *WebFrontEndImpl) Challenge(
11971194 }
11981195}
11991196
1200- // prepAccountForDisplay takes a core.Registration and mutates it to be ready
1201- // for display in a JSON response. Primarily it papers over legacy ACME v1
1202- // features or non-standard details internal to Boulder we don't want clients to
1203- // rely on.
1204- func prepAccountForDisplay (acct * core.Registration ) {
1205- // Zero out the account ID so that it isn't marshalled. RFC 8555 specifies
1206- // using the Location header for learning the account ID.
1207- acct .ID = 0
1208-
1209- // We populate the account Agreement field when creating a new response to
1210- // track which terms-of-service URL was in effect when an account with
1211- // "termsOfServiceAgreed":"true" is created. That said, we don't want to send
1212- // this value back to a V2 client. The "Agreement" field of an
1213- // account/registration is a V1 notion so we strip it here in the WFE2 before
1214- // returning the account.
1215- acct .Agreement = ""
1216- }
1217-
12181197// prepChallengeForDisplay takes a core.Challenge and prepares it for display to
12191198// the client by filling in its URL field and clearing several unnecessary
12201199// fields.
@@ -1432,8 +1411,6 @@ func (wfe *WebFrontEndImpl) Account(
14321411 response .Header ().Add ("Link" , link (wfe .SubscriberAgreementURL , "terms-of-service" ))
14331412 }
14341413
1435- prepAccountForDisplay (acct )
1436-
14371414 err = wfe .writeJsonResponse (response , logEvent , http .StatusOK , acct )
14381415 if err != nil {
14391416 wfe .sendError (response , logEvent , probs .ServerInternal ("Failed to marshal account" ), err )
@@ -1994,7 +1971,6 @@ func (wfe *WebFrontEndImpl) KeyRollover(
19941971 wfe .sendError (response , logEvent , probs .ServerInternal ("Error marshaling proto to registration" ), err )
19951972 return
19961973 }
1997- prepAccountForDisplay (& updatedAcct )
19981974
19991975 err = wfe .writeJsonResponse (response , logEvent , http .StatusOK , updatedAcct )
20001976 if err != nil {
0 commit comments