Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
fixing nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Aug 24, 2023
1 parent c1bbb59 commit 3f9ea9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jprov/server/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f9ea9f

Please sign in to comment.