diff --git a/internal/service/api/handlers/get_gist_data.go b/internal/service/api/handlers/get_gist_data.go index ff5d23c..c630cf1 100644 --- a/internal/service/api/handlers/get_gist_data.go +++ b/internal/service/api/handlers/get_gist_data.go @@ -13,6 +13,7 @@ import ( "github.com/rarimo/passport-identity-provider/resources" "gitlab.com/distributed_lab/ape" "gitlab.com/distributed_lab/ape/problems" + "gitlab.com/distributed_lab/logan/v3" ) func GetGistData(w http.ResponseWriter, r *http.Request) { @@ -63,6 +64,13 @@ func GetGistData(w http.ResponseWriter, r *http.Request) { return } + if gistProof.Root.Cmp(gistRoot) != 0 { + Log(r).WithFields(logan.F{ + "gist_root": gistRoot.String(), + "gist_proof_root": gistProof.Root.String(), + }).Warn("gist root does not match") + } + response := newGistDataResponse(req.UserDID, gistProof, gistRoot) ape.Render(w, response)