revisit request validation
dabasov opened this issue · comments
For every incoming request validate payloads, for example this logic causes panic() when proof is nil
var challengeRequest ChallengeRequest
decoder := json.NewDecoder(tReader)
err := decoder.Decode(&challengeRequest)
if err != nil {
logging.Logger.Error("Error decoding the input to validator")
return nil, "", common.NewError("input_decode_error", "Error in decoding the input."+err.Error())
}
challengeRequest.ChallengeProof
Also we need to add recovery to all the endpoints