Skip to content

Commit

Permalink
fix: HandlePut uses hardcoded default version (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen authored Sep 19, 2024
1 parent 0d37899 commit 10264b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func (svr *Server) HandlePut(w http.ResponseWriter, r *http.Request) (commitment
svr.WriteBadRequest(w, err)
return meta, err
}
// ReadCommitmentMeta function invoked inside HandlePut will not return a valid certVersion
// Current simple fix is using the hardcoded default value of 0 (also the only supported value)
//TODO: smarter decode needed when there's more than one version
meta.CertVersion = byte(commitments.CertV0)

input, err := io.ReadAll(r.Body)
if err != nil {
Expand Down

0 comments on commit 10264b0

Please sign in to comment.