From 3f9ea9f91f2beef490255704d4439ae5f201d9fe Mon Sep 17 00:00:00 2001 From: marston Date: Thu, 24 Aug 2023 15:16:16 -0400 Subject: [PATCH] fixing nil pointer --- jprov/server/attestation.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jprov/server/attestation.go b/jprov/server/attestation.go index 3e24b2c..3cd4186 100644 --- a/jprov/server/attestation.go +++ b/jprov/server/attestation.go @@ -111,6 +111,11 @@ func attest(w *http.ResponseWriter, r *http.Request, cmd *cobra.Command, q *queu return } + if upload.Response == nil { + http.Error(*w, fmt.Errorf(upload.Response.RawLog).Error(), http.StatusBadRequest) + return + } + if upload.Response.Code != 0 { http.Error(*w, fmt.Errorf(upload.Response.RawLog).Error(), http.StatusBadRequest) return